@@ -148,27 +148,28 @@ jobs:
148
148
149
149
- name : Check Server Version
150
150
run : |
151
+ CARGO_VERSION="${{ needs.get-next-version.outputs.new-release-version }}"
152
+
151
153
git checkout client-server
152
154
git config --global user.name 'github-actions[bot]'
153
155
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
154
156
git add Cargo.toml Cargo.lock
155
- git commit -m "build: bump project version to $CARGO_VERSION [skip ci]"
157
+ git commit -m "build: bump project version to $CARGO_VERSION [skip ci]" || echo "nothing to commit"
156
158
157
159
changes=$(git diff --name-only $(git describe --tags --abbrev=0)..HEAD -- src/)
158
160
159
161
if [ -n "$changes" ]; then
160
- CARGO_VERSION="${{ needs.get-next-version.outputs.new-release-version }}"
161
162
SERVER_VERSION=$(cat .github/server-version.txt | tr -d '\n')
162
163
if [ "$CARGO_VERSION" != "$SERVER_VERSION" ]; then
163
164
echo "Server version needs to be updated"
164
165
echo "$CARGO_VERSION" > .github/server-version.txt
165
166
166
167
git add .github/server-version.txt
167
- git commit -m "chore: update server version to $CARGO_VERSION [skip ci]"
168
+ git commit -m "chore: update server version to $CARGO_VERSION [skip ci]" || echo "nothing to commit"
168
169
fi
169
170
fi
170
171
171
- git push
172
+ git push || echo "nothing to commit"
172
173
173
174
release :
174
175
runs-on : ubuntu-latest
@@ -180,6 +181,23 @@ jobs:
180
181
with :
181
182
fetch-depth : 0
182
183
184
+ - name : Cache Cargo
185
+ uses : actions/cache@v4
186
+ id : cargo-cache
187
+ with :
188
+ path : |
189
+ ~/.cargo/bin/
190
+ ~/.cargo/registry/index/
191
+ ~/.cargo/registry/cache/
192
+ ~/.cargo/git/db/
193
+ target/
194
+ key : x86_64-unknown-linux-musl-cargo-${{ hashFiles('**/Cargo.lock') }}
195
+
196
+ - name : Install semantic-release-cargo
197
+ uses : taiki-e/install-action@v2
198
+ with :
199
+ tool : semantic-release-cargo@2
200
+
183
201
- name : Download artifacts
184
202
uses : actions/download-artifact@v3
185
203
with :
@@ -195,6 +213,7 @@ jobs:
195
213
npm install -g @semantic-release/changelog
196
214
npm install -g @semantic-release/git
197
215
npm install -g @semantic-release/github
216
+ npm install -g @semantic-release/exec
198
217
npm install -g @semantic-release-cargo/semantic-release-cargo
199
218
npx semantic-release --repository-url https://github.com/vyfor/cord.nvim
200
219
@@ -234,4 +253,4 @@ jobs:
234
253
Cord offers a wide range of customization options allowing you to create custom and dynamic experiences that adapt to your needs.
235
254
The possibilities are endless, and the only limit is your creativity!
236
255
env :
237
- LUAROCKS_API_KEY : ${{ secrets.LUAROCKS_API_KEY }}
256
+ LUAROCKS_API_KEY : ${{ secrets.LUAROCKS_API_KEY }}
0 commit comments