diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 06f4370bc139cd5e89f90d0155e639dae72dfdf1..a3cdc051532be405eb27f378f5ae320b83b4f6e6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -7,6 +7,7 @@ variables:
 
 stages:
   - test
+  - release
   - deploy 
 
 #before_script:
@@ -38,7 +39,7 @@ web-tests:
   tags:
     - nixos-gen3
   script:
-    -  nix develop .#gitlab --command run-web-tests
+    -  nix develop .#gitlab --command run-ci-web-tests
   cache:
     untracked: true
     key:
@@ -51,16 +52,20 @@ web-tests:
       - screenshot.png
   
   
+release:
+  stage: release
+  tags:
+    - nixos-gen3
+  script:
+    - nix develop .#gitlab --command release
+  when: on_success  
   
+deploy:
+  stage: deploy
+  tags:
+    - nixos-gen3
+  script:
+    - nix develop .#gitlab --command build-and-publish
+  when: on_success  
   
-  #deploy:
-#  stage: deploy
-#  tags:
-#    - nixos-gen3
-#  script:
-#    - nix develop --command deploy
-#  after_script:
-#    - nix develop --command clean-up 
-#
-#  when: on_success
   
\ No newline at end of file
diff --git a/README.md b/README.md
index db948d72cbaa0dd5f06d375045927d1bd292e964..1a78e8db3d06f9527282e624bf34c6ddd6e8c397 100644
--- a/README.md
+++ b/README.md
@@ -1,19 +1,22 @@
 # Monster
 
-Monster is an ideal choice for building visually appealing and high-performance web interfaces and websites using modern JavaScript techniques.
+Monster is an ideal choice for building visually appealing and high-performance web interfaces and websites using modern
+JavaScript techniques.
 
-By leveraging cutting-edge JavaScript features such as classes, WeakRef, WeakMaps, proxies, and the MutationObserver interface, Monster 
+By leveraging cutting-edge JavaScript features such as classes, WeakRef, WeakMaps, proxies, and the MutationObserver
+interface, Monster
 offers a blend of traditional methods and innovative web components.
 
 Designed for seamless integration, Monster complements existing web projects without dominating the entire architecture.
 
-Unlike solutions that introduce a new layer of abstraction and proprietary languages, Monster focuses on enhancing 
+Unlike solutions that introduce a new layer of abstraction and proprietary languages, Monster focuses on enhancing
 the native capabilities of HTML, CSS, and JavaScript for web development.
 
-With a design goal to optimize performance and achieve stellar outcomes, Monster achieves 
+With a design goal to optimize performance and achieve stellar outcomes, Monster achieves
 this using minimal JavaScript code.
 
-Monster is built with ES6 modules and utilizes the [import](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/import) 
+Monster is built with ES6 modules and uses
+the [import](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/import)
 and [export](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export) statements.
 
 For certain functions, additional [polyfills](#polyfill) may be required.
@@ -25,17 +28,19 @@ To access our documentation and examples, visit [monsterjs.org/](https://monster
 ## Installation
 
 Install Monster using npm, Yarn, or pnpm:
+
 - `npm install @schukai/monster`
 - `yarn add @schukai/monster`
 - `pnpm add @schukai/monster`
 
 ## Usage
 
-Here is a simple example of how to use Monster. We create a small file named `index.mjs` 
+Here is a simple example of how to use Monster. We create a small file named `index.mjs`
 (where 'm' stands for module). In this example, we perform substitutions in a string:
 
 ```js
-import { Formatter } from '@schukai/monster/source/text/formatter.mjs';
+import {Formatter} from '@schukai/monster/source/text/formatter.mjs';
+
 const text = '${mykey${subkey}}';
 let obj = {
     mykey2: "1",
@@ -46,7 +51,8 @@ new Formatter(obj).format(text);
 // Outputs: 1
 ```
 
-To integrate this function into a website, it is recommended to use a bundler such as [esbuild](https://esbuild.github.io/):
+To integrate this function into a website, it is recommended to use a bundler such
+as [esbuild](https://esbuild.github.io/):
 
 ```sh
 esbuild index.mjs --outfile=dist.js
@@ -69,13 +75,14 @@ Voilà!
 
 ### Polyfill
 
-While we strive to work around some browser bugs, generally, we do not use polyfills or feature detection. 
+While we strive to work around some browser bugs, generally, we do not use polyfills or feature detection.
 However, many functions can be supplemented through [polyfill.io](https://polyfill.io/), thus enhancing compatibility.
 
 ```html
-<script id="polyfill" src="https://polyfill.io/v3/polyfill.min.js?features=AbortController,Array.prototype.entries,Array.prototype.fill,Array.prototype.find,Array.prototype.includes,Array.prototype.keys,Array.prototype.sort,Array.prototype.values,atob,AudioContext,blissfuljs,Blob,CharacterData.prototype.nextElementSibling,CharacterData.prototype.previousElementSibling,CharacterData.prototype.remove,console,console.error,console.log,CSS.supports,CustomEvent,DocumentFragment,DocumentFragment.prototype.append,DocumentFragment.prototype.prepend,DOMRect,DOMTokenList,DOMTokenList.prototype.forEach,DOMTokenList.prototype.replace,Element.prototype.append,Element.prototype.getAttributeNames,Element.prototype.prepend,Element.prototype.remove,Element.prototype.scroll,Event,EventSource,fetch,Function.prototype.name,globalThis,HTMLDocument,HTMLPictureElement,HTMLTemplateElement,IntersectionObserver,IntersectionObserverEntry,Intl,Intl.DateTimeFormat,Intl.NumberFormat,Intl.PluralRules,Map,Math.log2,MutationObserver,Node.prototype.contains,Node.prototype.getRootNode,Node.prototype.isConnected,Node.prototype.isSameNode,NodeList.prototype.forEach,Number.isFinite,Number.isInteger,Object.assign,Object.entries,Object.freeze,Object.getOwnPropertyNames,Object.prototype.toString,Reflect,Reflect.defineProperty,Reflect.get,Reflect.getOwnPropertyDescriptor,Reflect.setPrototypeOf,requestAnimationFrame,ResizeObserver,Set,String.prototype.includes,String.prototype.matchAll,String.prototype.padStart,Symbol,Symbol.for,Symbol.hasInstance,Symbol.iterator,TextDecoder,TextEncoder,Uint16Array,Uint8Array,URLSearchParams,WeakSet"
-       crossorigin="anonymous"
-       referrerpolicy="no-referrer"></script>
+<script id="polyfill"
+        src="https://polyfill.io/v3/polyfill.min.js?features=AbortController,Array.prototype.entries,Array.prototype.fill,Array.prototype.find,Array.prototype.includes,Array.prototype.keys,Array.prototype.sort,Array.prototype.values,atob,AudioContext,blissfuljs,Blob,CharacterData.prototype.nextElementSibling,CharacterData.prototype.previousElementSibling,CharacterData.prototype.remove,console,console.error,console.log,CSS.supports,CustomEvent,DocumentFragment,DocumentFragment.prototype.append,DocumentFragment.prototype.prepend,DOMRect,DOMTokenList,DOMTokenList.prototype.forEach,DOMTokenList.prototype.replace,Element.prototype.append,Element.prototype.getAttributeNames,Element.prototype.prepend,Element.prototype.remove,Element.prototype.scroll,Event,EventSource,fetch,Function.prototype.name,globalThis,HTMLDocument,HTMLPictureElement,HTMLTemplateElement,IntersectionObserver,IntersectionObserverEntry,Intl,Intl.DateTimeFormat,Intl.NumberFormat,Intl.PluralRules,Map,Math.log2,MutationObserver,Node.prototype.contains,Node.prototype.getRootNode,Node.prototype.isConnected,Node.prototype.isSameNode,NodeList.prototype.forEach,Number.isFinite,Number.isInteger,Object.assign,Object.entries,Object.freeze,Object.getOwnPropertyNames,Object.prototype.toString,Reflect,Reflect.defineProperty,Reflect.get,Reflect.getOwnPropertyDescriptor,Reflect.setPrototypeOf,requestAnimationFrame,ResizeObserver,Set,String.prototype.includes,String.prototype.matchAll,String.prototype.padStart,Symbol,Symbol.for,Symbol.hasInstance,Symbol.iterator,TextDecoder,TextEncoder,Uint16Array,Uint8Array,URLSearchParams,WeakSet"
+        crossorigin="anonymous"
+        referrerpolicy="no-referrer"></script>
 ```
 
 ## Questions
@@ -85,17 +92,18 @@ The issue list of this repository is exclusively for bug reports and feature req
 
 ## Issues
 
-Please ensure you read the Issue Reporting Checklist before opening an issue. Issues not conforming to the guidelines may 
+Please ensure you read the Issue Reporting Checklist before opening an issue. Issues not conforming to the guidelines
+may
 be closed immediately.
 
 ## License
 
-Copyright © 2023 schukai GmbH
+Copyright © 2024 schukai GmbH
 
 Licensed under [AGPL](https://www.gnu.org/licenses/agpl-3.0.de.html). Commercial licenses are also available.
 
 ## Changelog
 
-Detailed changes for each release are documented in the 
+Detailed changes for each release are documented in the
 [CHANGELOG](https://gitlab.schukai.com/oss/libraries/javascript/monster/-/blob/master/application/CHANGELOG.md).
 
diff --git a/flake.nix b/flake.nix
index e178d24f2f8c5bfb1ba887350fd484cfed2fe6fa..579c30f4ac73904ecad99a6c031eb91174f88de5 100644
--- a/flake.nix
+++ b/flake.nix
@@ -123,14 +123,18 @@
 
           scriptCleanUp = pkgs'.callPackage ./nix/scripts/clean-up.nix {inherit pkgs';};
           scriptRunCITests = pkgs'.callPackage ./nix/scripts/run-ci-tests.nix {inherit pkgs';};
+          scriptRunCIWebTests = pkgs'.callPackage ./nix/scripts/run-ci-web-tests.nix {inherit pkgs';};
           scriptRelease = pkgs'.callPackage ./nix/scripts/release.nix {inherit pkgs';};
+          scriptBuildAndPublish = pkgs'.callPackage ./nix/scripts/build-and-publish.nix {inherit pkgs';};
 
           commonPackages = import ./nix/config/common-packages.nix {inherit pkgs';};
 
           extendedPackages = [
             scriptCleanUp
             scriptRunCITests
+            scriptRunCIWebTests
             scriptRelease
+            scriptBuildAndPublish
           ];
 
           scriptPackages = [
diff --git a/nix/packages/monster.nix b/nix/packages/monster.nix
index 9d2e0fe4d45b7d57fe99c0337579a103d28be0d9..96fb9819198b804b1f3ad7467a043c0041cdeedb 100644
--- a/nix/packages/monster.nix
+++ b/nix/packages/monster.nix
@@ -1,17 +1,19 @@
 {
-  pkgs,
-  commonScript,
+  pkgs',
   system,
+  self,
   ...
-}:
-# derivation is a function that takes a set of attributes and returns a set of attributes.
-# https://nixos.org/manual/nix/stable/language/derivations.html
+}: let
+  buildDate = builtins.toString self.lastModified;
+  releaseInfo = import ../config/release.nix;
+in
 derivation {
   name = "monster";
-  builder = "${pkgs.bash}/bin/bash";
+    version = releaseInfo.version;
+    builder = "${pkgs'.bash}/bin/bash";
   args = let
-    script = pkgs.callPackage ../scripts/build.nix {inherit commonScript;};
+    script = pkgs'.callPackage ../scripts/build.nix {inherit pkgs' system;};
   in ["${script}/bin/build"];
-  buildInputs = with pkgs; [];
+  buildInputs = with pkgs'; [];
   system = system;
 }
diff --git a/nix/scripts/build-and-publish.nix b/nix/scripts/build-and-publish.nix
index e5e9c0c46928e9e835b4606d86ef220f0652a3eb..bd07c25879ae8973017e63f6af7e02bb1d5101be 100644
--- a/nix/scripts/build-and-publish.nix
+++ b/nix/scripts/build-and-publish.nix
@@ -1,76 +1,28 @@
-{pkgs', ...}: let
+{pkgs',
+system,
+self,
+ ...}: let
+  bashFktScript = import ./bash-fkt.nix {
+    inherit pkgs';
+  };
+  releaseInfo = import ../config/release.nix;
+  monster = pkgs'.callPackage ../packages/monster.nix {inherit pkgs' system self;};
 in
   pkgs'.writeShellScriptBin "build-and-publish" ''
     source ${pkgs'.common}/bin/common
-
-    echo_section "build and publish"
-    echo_hint "This script will run the tests for the project, build the tarball and publish it to the repository."
-    echo_hint "The command is executed in the current working directory and not in a nix derivation."
+    ${bashFktScript}
     cd_working_dir
 
-    echo_step "Update the monster file"
-    if ! ${pkgs'.nodejs_22}/bin/node ./development/scripts/buildMonsterFile.mjs
-    then
-      echo_fail "script buildMonsterFile.mjs failed, check your JS!"
-      exit 1
-    fi
-    echo_ok "Monster file updated."
-
-    echo_section "run tests"
-    TEST_PATH="./test"
-    TEST_CASES_PATH="''${TEST_PATH}/cases/"
-    if ! ${pkgs'.nodePackages.mocha}/bin/mocha --colors --jobs 1 --bail --recursive $TEST_CASES_PATH
-    then
-      echo_fail "Tests failed, check your JS!"
-      exit 1
-    fi
-    echo_ok "Tests passed."
-
-    tempDir=$(${pkgs'.coreutils}/bin/mktemp -d)
-
-    if ! nix build --no-link --json .#monster > $tempDir/build_result.json
-    then
-      ${pkgs'.coreutils}/bin/rm -rf $tempDir
-      echo_fail "Failed to build the project."
-      echo_hint "You can test the build by running ' nix build .#monster --print-build-logs'."
-      exit 1
-    fi
-
-    echo_step "Check if git is clean"
-    if [[ -n "$(git status --porcelain)" ]]; then
-        echo_fail "Git is not clean. Exiting."
-        echo_hint "You must commit all changes before you can publish a new version."
-        echo_hint "You can stash your changes with 'git stash' and apply them later with 'git stash pop'."
-        exit 1
-    fi
-
-    cd $tempDir
-
-    result=$(${pkgs'.jq}/bin/jq -r '.[].outputs.out' < $tempDir/build_result.json)
-    ${pkgs'.coreutils}/bin/rm build_result.json
-
-    tarArchive=$(${pkgs'.findutils}/bin/find $result -name "*.tgz")
-
-    if [ -z "$tarArchive" ]
-    then
-      echo_fail "Failed to find the tarball."
-      cd -
-      ${pkgs'.coreutils}/bin/rm -rf $tempDir
-      exit 1
-    fi
-
+    echo_section "build and publish"
+    archive=$(ls ${monster} | grep tgz)
+ 
     ## npm instead of pnpm because of https://github.com/pnpm/pnpm/issues/7950
-    if ! publishingResult=$(${pkgs'.nodejs_22}/bin/npm publish "$tarArchive" --json --dry-run --no-git-checks --access public)
+    if ! publishingResult=$(${pkgs'.nodejs_22}/bin/npm publish "${monster}/$archive" --json --dry-run --no-git-checks --access public)
     then
-      cd -
-      ${pkgs'.coreutils}/bin/rm -rf $tempDir
       echo_fail "Failed to publish the project."
       exit 1
     fi
 
-    cd -
-    ${pkgs'.coreutils}/bin/rm -rf $tempDir
-
     echo_hint "ID: $(echo $publishingResult | jq .id)"
     echo_hint "Name: $(echo $publishingResult | jq .name)"
     echo_hint "Version $(echo $publishingResult | jq .version)"
diff --git a/nix/scripts/build.nix b/nix/scripts/build.nix
index 1a77a42b3424758464d7e13a7c68052c7da6f0c6..c7e7bfba933324b4ce98580c904229bc91fb6e70 100644
--- a/nix/scripts/build.nix
+++ b/nix/scripts/build.nix
@@ -1,9 +1,13 @@
 {pkgs', ...}: let
+
+  bashFktScript = import ./bash-fkt.nix {
+    inherit pkgs';
+  };
+
   packageData = builtins.fromJSON (builtins.readFile ../../package.json);
   version = packageData.version;
   lib = pkgs'.lib;
   root = ../..;
-  gitignore = ../../.gitignore;
   source = ../../source;
   test = ../../test;
 
@@ -24,19 +28,19 @@
 in
   pkgs'.writeShellScriptBin "build" ''
     source ${pkgs'.common}/bin/common
-
+    ${bashFktScript}
+set -x
     export PATH=${lib.makeBinPath [pkgs'.gzip pkgs'.gnutar]}
 
     export HOME=$NIX_BUILD_TOP # Some packages need a writable HOME
-    ${pkgs'.coreutils}/bin/mkdir -p $out
 
-    if ! ${pkgs'.rsync}/bin/rsync -a --exclude-from="${gitignore}" "${source}/." "./source/"
+    if ! ${pkgs'.rsync}/bin/rsync -a --exclude-from="${root}/.gitignore" "${source}/." "./source/"
     then
       echo_fail "Failed to copy source files. Exiting."
       exit 1
     fi
 
-    if ! ${pkgs'.rsync}/bin/rsync -a --exclude-from="${gitignore}" "${test}/." "./test/"
+    if ! ${pkgs'.rsync}/bin/rsync -a --exclude-from="${root}/.gitignore" "${test}/." "./test/"
     then
       echo_fail "Failed to copy test files. Exiting."
       exit 1
@@ -66,6 +70,7 @@ in
       exit 1
     fi
 
+    ${pkgs'.coreutils}/bin/mkdir -p $out
     if ! ${pkgs'.gnutar}/bin/tar -czvf $out/monster-${version}.tgz .
     then
       echo_fail "Failed to create tarball. Exiting."
diff --git a/nix/scripts/create-new-component-class.nix b/nix/scripts/create-new-component-class.nix
index 51ec16b3c1f0f35181a7c685029d970a6be79171..92393f417eaae3e9590438898e5307169d822fe2 100644
--- a/nix/scripts/create-new-component-class.nix
+++ b/nix/scripts/create-new-component-class.nix
@@ -1,6 +1,4 @@
-{pkgs', ...}: let
-in
-  pkgs'.writeShellScriptBin "create-new-component-class" ''
+{pkgs', ...}: pkgs'.writeShellScriptBin "create-new-component-class" ''
     source ${pkgs'.common}/bin/common
 
     echo_section "create new component class"
diff --git a/nix/scripts/deploy.nix b/nix/scripts/deploy.nix
deleted file mode 100644
index 78e0b9f9a613ae74fdd2ac24bc22ff5124f026e9..0000000000000000000000000000000000000000
--- a/nix/scripts/deploy.nix
+++ /dev/null
@@ -1,82 +0,0 @@
-{pkgs', ...}: let
-  ciRepositoryUrl = builtins.getEnv "CI_REPOSITORY_URL";
-  ciProjectDir = builtins.getEnv "CI_PROJECT_DIR";
-  ciJobToken = builtins.getEnv "CI_JOB_TOKEN";
-  ciCommitSha = builtins.getEnv "CI_COMMIT_SHA";
-  ciCommitRefName = builtins.getEnv "CI_COMMIT_REF_NAME";
-  gitlabToken = builtins.getEnv "GITLAB_TOKEN";
-  gitlabUserEmail = builtins.getEnv "GITLAB_USER_EMAIL";
-  gitlabUserName = builtins.getEnv "GITLAB_USER_NAME";
-in
-  pkgs'.writeShellScriptBin "deploy" ''
-    ${commonScript}
-
-    echo_header "Deploying"
-
-    if [ -z "${gitlabToken}" ]; then
-        echo_fail "Error: CI_JOB_TOKEN variable is not set."
-        echo_hint "This script is intended to be run in GitLab CI."
-        exit 1
-    fi
-
-    if [ -z "${ciRepositoryUrl}" ]; then
-        echo_fail "Error: CI_REPOSITORY_URL environment variable is not set."
-        exit 1
-    fi
-
-    if [ -z "${ciProjectDir}" ]; then
-        echo_fail "Error: CI_PROJECT_DIR environment variable is not set."
-        exit 1
-    fi
-
-    cd ${ciProjectDir} || exit 1
-
-    ${pkgs'.git}/bin/git config --global user.email "${gitlabUserEmail}"
-    ${pkgs'.git}/bin/git config --global user.name "${gitlabUserName}"
-    ${pkgs'.git}/bin/git config --global credential.helper '!f() { echo "username=gitlab-ci-token"; echo "password=${ciJobToken}"; }; f'
-    ${pkgs'.git}/bin/git config --global pull.rebase true
-    ${pkgs'.git}/bin/git config --global http.sslVerify "false"
-
-    ${pkgs'.git}/bin/git remote set-url origin https://pad:${gitlabToken}@''${CI_REPOSITORY_URL#*@}
-
-    ${pkgs'.git}/bin/git fetch --all --tags --unshallow
-    ${pkgs'.git}/bin/git reset --hard origin/master
-    ${pkgs'.git}/bin/git clean -fd
-    ${pkgs'.git}/bin/git checkout $CI_COMMIT_REF_NAME
-    ${pkgs'.git}/bin/git pull origin $CI_COMMIT_REF_NAME
-
-    if ! ${pkgs'.git}/bin/git --no-pager log --decorate=short --pretty=oneline -n 30
-    then
-        echo_fail "Error: Could not get git log."
-        exit 1
-    fi
-
-    ${pkgs'.git}/bin/git fetch --prune --prune-tags
-
-    echo_step "Bumping version"
-    gitVersion=$(${versionBin} predict --exit-code-if-no-bump)
-    if [ -z "$gitVersion" ]; then
-        echo_ok "There is no version bump."
-        echo_ok "done"
-        exit 0
-    fi
-
-    gitVersion="v$gitVersion"
-
-    echo "{\"version\": \"$gitVersion\", \"release\": \"${ciCommitSha}\"}" > release.json
-    ${pkgs'.git}/bin/git add release.json
-
-    ${pkgs'.nodejs}/bin/npm version $gitVersion --no-git-tag-version
-    ${pkgs'.git}/bin/git add package.json package-lock.json
-
-    ${updateChangelogScript}
-    ${pkgs'.git}/bin/git add CHANGELOG.md
-
-    ${pkgs'.git}/bin/git commit -m "chore: update release.json"
-
-    ${pkgs'.git}/bin/git tag -a $gitVersion -m"chore: bump version to $gitVersion"
-    ${pkgs'.git}/bin/git --no-pager log --decorate=short --pretty=oneline -n 5
-    ${pkgs'.git}/bin/git push -o ci.skip origin ${ciCommitRefName} --tags
-
-    echo_ok "done"
-  ''
diff --git a/nix/scripts/prepare-release.nix b/nix/scripts/prepare-release.nix
deleted file mode 100644
index 49ca2ed168681d8e7c016775d59ea0e01bbdb437..0000000000000000000000000000000000000000
--- a/nix/scripts/prepare-release.nix
+++ /dev/null
@@ -1,81 +0,0 @@
-{pkgs', ...}: let
-in
-  pkgs'.writeShellScriptBin "prepare-release" ''
-    source ${pkgs'.common}/bin/common
-
-    echo_section "prepare-release"
-    echo_hint "This script will update changelog and increment version if necessary."
-    echo_hint "The command is executed in the current working directory and not in a nix derivation."
-    cd_working_dir
-
-    echo_step "calculate new version"
-    if ! ${pkgs'.nodejs_22}/bin/node ./development/scripts/buildMonsterFile.mjs
-    then
-      echo_fail "script buildMonsterFile.mjs failed, check your JS!"
-      exit 1
-    fi
-    echo_ok "Monster file updated."
-
-    echo_section "run tests"
-    TEST_PATH="./test"
-    TEST_CASES_PATH="''${TEST_PATH}/cases/"
-    if ! ${pkgs'.nodePackages.mocha}/bin/mocha --colors --jobs 1 --bail --recursive $TEST_CASES_PATH
-    then
-      echo_fail "Tests failed, check your JS!"
-      exit 1
-    fi
-    echo_ok "Tests passed."
-
-    tempDir=$(${pkgs'.coreutils}/bin/mktemp -d)
-
-    if ! nix build --no-link --json .#monster > $tempDir/build_result.json
-    then
-      ${pkgs'.coreutils}/bin/rm -rf $tempDir
-      echo_fail "Failed to build the project."
-      echo_hint "You can test the build by running ' nix build .#monster --print-build-logs'."
-      exit 1
-    fi
-
-    echo_step "Check if git is clean"
-    if [[ -n "$(git status --porcelain)" ]]; then
-        echo_fail "Git is not clean. Exiting."
-        echo_hint "You must commit all changes before you can publish a new version."
-        echo_hint "You can stash your changes with 'git stash' and apply them later with 'git stash pop'."
-        exit 1
-    fi
-
-    cd $tempDir
-
-    result=$(${pkgs'.jq}/bin/jq -r '.[].outputs.out' < $tempDir/build_result.json)
-    ${pkgs'.coreutils}/bin/rm build_result.json
-
-    tarArchive=$(${pkgs'.findutils}/bin/find $result -name "*.tgz")
-
-    if [ -z "$tarArchive" ]
-    then
-      echo_fail "Failed to find the tarball."
-      cd -
-      ${pkgs'.coreutils}/bin/rm -rf $tempDir
-      exit 1
-    fi
-
-    ## npm instead of pnpm because of https://github.com/pnpm/pnpm/issues/7950
-    if ! publishingResult=$(${pkgs'.nodejs_22}/bin/npm publish "$tarArchive" --json --dry-run --no-git-checks --access public)
-    then
-      cd -
-      ${pkgs'.coreutils}/bin/rm -rf $tempDir
-      echo_fail "Failed to publish the project."
-      exit 1
-    fi
-
-    cd -
-    ${pkgs'.coreutils}/bin/rm -rf $tempDir
-
-    echo_hint "ID: $(echo $publishingResult | jq .id)"
-    echo_hint "Name: $(echo $publishingResult | jq .name)"
-    echo_hint "Version $(echo $publishingResult | jq .version)"
-    echo_hint "SHA Sum: $(echo $publishingResult | jq .shasum)"
-    echo_hint "Files: $(echo $publishingResult | jq .entryCount)"
-
-    echo_ok "Build and publish successful."
-  ''
diff --git a/nix/scripts/release.nix b/nix/scripts/release.nix
index 6049e47038e49d16190ae4a60824e95f634e99ab..c2309deac9deae9cd6b22281125f91f64279d1a9 100644
--- a/nix/scripts/release.nix
+++ b/nix/scripts/release.nix
@@ -57,13 +57,16 @@ in
     export NAME=$(basename $(pwd) | sed 's/./\U&/' | sed 's/-//g')
     export MNEMONIC=$(echo $NAME | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]//g')
     ${pkgs'.envsubst}/bin/envsubst < ./nix/config/release.nix.template > ./nix/config/release.nix
+    
+    ${pkgs'.nodejs_22}/bin/pnpm version "$gitVersion"
+
 
     ${pkgs'.git}/bin/git tag -a $gitVersion -m"chore: bump version to $gitVersion"
     ${updateChangelogScript}/bin/update-changelog
     cd $CI_PROJECT_DIR || exit 1
 
     ${pkgs'.git}/bin/git tag -d "$gitVersion"
-    ${pkgs'.git}/bin/git commit -m "chore: release $gitVersion" CHANGELOG.md ./nix/config/release.nix
+    ${pkgs'.git}/bin/git commit -m "chore: release $gitVersion" CHANGELOG.md ./nix/config/release.nix package.json
 
     ${pkgs'.git}/bin/git tag -a $gitVersion -m"chore: bump version to $gitVersion"
     ${pkgs'.git}/bin/git --no-pager log --decorate=short --pretty=oneline -n 5