77 required : true
88 type : choice
99 options :
10- - alpha # Increase the alpha pre-version (x.y.z-alpha.M)
11- - beta # Increase the beta pre-version (x.y.z-beta.M)
12- - patch # Increase the patch version (x.y.z)
13- - minor # Increase the minor version (x.y.0)
14- - major # Increase the major version (x.0.0)
10+ - alpha # Increase the alpha pre-version (x.y.z-alpha.M)
11+ - beta # Increase the beta pre-version (x.y.z-beta.M)
12+ - patch # Increase the patch version (x.y.z)
13+ - minor # Increase the minor version (x.y.0)
14+ - major # Increase the major version (x.0.0)
1515 - release # Remove the pre-version, ie remove alpha/beta/rc (x.y.z)
16- - rc # Increase the rc pre-version (x.y.z-rc.M)
17-
16+ - rc # Increase the rc pre-version (x.y.z-rc.M)
1817jobs :
1918 release :
2019 runs-on : ubuntu-latest
@@ -26,71 +25,62 @@ jobs:
2625 fetch-depth : 0
2726 submodules : recursive
2827 ssh-key : ${{ secrets.PUBLISHER_SSH_KEY }}
29-
30- - uses : DeterminateSystems/nix-installer-action@v4
31- - uses : DeterminateSystems/magic-nix-cache-action@v2
32-
28+ - uses : nixbuild/nix-quick-install-action@v30
29+ with :
30+ nix_conf : |
31+ keep-env-derivations = true
32+ keep-outputs = true
33+ - name : Restore and save Nix store
34+ uses : nix-community/cache-nix-action@v6
35+ with :
36+ primary-key : nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
37+ restore-prefixes-first-match : nix-${{ runner.os }}-
38+ gc-max-store-size-linux : 1G
3339 - name : Install NodeJS v22
3440 uses : actions/setup-node@v4
3541 with :
3642 node-version : 22
3743 cache : ' npm'
38-
39- - run : nix develop -c rainix-rs-prelude
40-
4144 - name : Run rainix-rs-test
42- run : nix develop -c rainix-rs-test
43-
45+ run : nix develop -c cargo test
4446 - name : Build JS Bindings
45- run : nix develop -c build-js-bindings
46-
47+ run : nix develop -c build-js-bindings
4748 - name : Run JS Tests
48- run : nix develop -c test-js-bindings
49-
49+ run : nix develop -c test-js-bindings
5050 - name : Git Config
5151 run : |
5252 git config --global user.email "${{ secrets.CI_GIT_EMAIL }}"
5353 git config --global user.name "${{ secrets.CI_GIT_USER }}"
54-
5554 - name : Publish to crates.io
5655 run : nix develop -c cargo release --no-confirm --execute --no-tag --workspace ${{ inputs.version-level }}
5756 env :
5857 CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
59-
6058 # set npm version to rust crate version
6159 - name : Set Version
6260 run : echo "NEW_VERSION=$(nix develop -c npm version $(node ./scripts/version.js) --no-git-tag-version)" >> $GITHUB_ENV
63-
6461 # Commit changes and tag
6562 - name : Commit And Tag
6663 run : |
6764 git add "package.json"
6865 git add "package-lock.json"
6966 git commit -m "Release ${{ env.NEW_VERSION }}"
7067 git tag ${{ env.NEW_VERSION }}
71-
7268 # Push the commit to remote
7369 - name : Push Changes To Remote
74- run : |
75- git push origin
76- git push -u origin ${{ env.NEW_VERSION }}
70+ run : " git push origin \n git push -u origin ${{ env.NEW_VERSION }}\n "
7771 env :
7872 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
79-
8073 # Create npm package tarball to put in release files
8174 - name : Create NPM Package Tarball
8275 run : echo "NPM_PACKAGE=$(nix develop -c npm pack --silent)" >> $GITHUB_ENV
83-
8476 - name : Rename NPM Package Tarball
8577 run : mv ${{ env.NPM_PACKAGE }} dotrain_npm_package_${{ env.NEW_VERSION }}.tgz
86-
8778 # publish to npm
8879 - name : Publish To NPM
8980 uses : JS-DevTools/npm-publish@v1
9081 with :
9182 token : ${{ secrets.NPM_TOKEN }}
9283 access : public
93-
9484 # Create gitHub release with npm tarball
9585 - name : Create GitHub Release
9686 id : gh_release
@@ -101,16 +91,14 @@ jobs:
10191 files : dotrain_npm_package_${{ env.NEW_VERSION }}.tgz
10292 env :
10393 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
104-
105-
10694 release_bin :
10795 name : Release dotrain cli ${{ matrix.platform }}_${{ matrix.arch }} bin
10896 needs : release
10997 runs-on : ${{ matrix.runner }}
11098 strategy :
11199 fail-fast : false
112100 matrix :
113- include :
101+ include :
114102 - runner : ubuntu-22.04
115103 target : x86_64-unknown-linux-gnu
116104 platform : linux
@@ -127,30 +115,32 @@ jobs:
127115 target : aarch64-apple-darwin
128116 platform : darwin
129117 arch : arm64
130-
131118 steps :
132119 - uses : actions/checkout@v4
133120 with :
134121 fetch-depth : 0
135122 submodules : recursive
136123 ssh-key : ${{ secrets.PUBLISHER_SSH_KEY }}
137-
138- - uses : DeterminateSystems/nix-installer-action@v4
139- - uses : DeterminateSystems/magic-nix-cache-action@v2
140-
124+ - uses : nixbuild/nix-quick-install-action@v30
125+ with :
126+ nix_conf : |
127+ keep-env-derivations = true
128+ keep-outputs = true
129+ - name : Restore and save Nix store
130+ uses : nix-community/cache-nix-action@v6
131+ with :
132+ primary-key : nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
133+ restore-prefixes-first-match : nix-${{ runner.os }}-
134+ gc-max-store-size-linux : 1G
141135 - name : Git Config
142136 run : |
143137 git config --global user.email "${{ secrets.CI_GIT_EMAIL }}"
144138 git config --global user.name "${{ secrets.CI_GIT_USER }}"
145-
146139 - name : Pull Release Commit
147140 run : git pull origin
148-
149141 - name : Build Bin
150142 run : nix develop -c cargo build -r --features cli --bin dotrain --target "${{ matrix.target }}"
151-
152143 - run : cp ./target/${{ matrix.target }}/release/dotrain ./dotrain_cli_${{ needs.release.outputs.version }}_${{ matrix.platform }}_${{ matrix.arch }}
153-
154144 - name : Add Bin To Release
155145 uses : softprops/action-gh-release@v2
156146 with :
0 commit comments