Skip to content

Commit

Permalink
ci: fix release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
vyfor committed Jan 7, 2025
1 parent 8824070 commit 8e2242d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,27 +148,28 @@ jobs:

- name: Check Server Version
run: |
CARGO_VERSION="${{ needs.get-next-version.outputs.new-release-version }}"
git checkout client-server
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add Cargo.toml Cargo.lock
git commit -m "build: bump project version to $CARGO_VERSION [skip ci]"
git commit -m "build: bump project version to $CARGO_VERSION [skip ci]" || echo "nothing to commit"
changes=$(git diff --name-only $(git describe --tags --abbrev=0)..HEAD -- src/)
if [ -n "$changes" ]; then
CARGO_VERSION="${{ needs.get-next-version.outputs.new-release-version }}"
SERVER_VERSION=$(cat .github/server-version.txt | tr -d '\n')
if [ "$CARGO_VERSION" != "$SERVER_VERSION" ]; then
echo "Server version needs to be updated"
echo "$CARGO_VERSION" > .github/server-version.txt
git add .github/server-version.txt
git commit -m "chore: update server version to $CARGO_VERSION [skip ci]"
git commit -m "chore: update server version to $CARGO_VERSION [skip ci]" || echo "nothing to commit"
fi
fi
git push
git push || echo "nothing to commit"
release:
runs-on: ubuntu-latest
Expand All @@ -195,6 +196,7 @@ jobs:
npm install -g @semantic-release/changelog
npm install -g @semantic-release/git
npm install -g @semantic-release/github
npm install -g @semantic-release/exec
npm install -g @semantic-release-cargo/semantic-release-cargo
npx semantic-release --repository-url https://github.com/vyfor/cord.nvim
Expand Down Expand Up @@ -234,4 +236,4 @@ jobs:
Cord offers a wide range of customization options allowing you to create custom and dynamic experiences that adapt to your needs.
The possibilities are endless, and the only limit is your creativity!
env:
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
1 change: 0 additions & 1 deletion .releaserc.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ module.exports = {
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
["@semantic-release-cargo/semantic-release-cargo"],
[
"@semantic-release/exec",
{
Expand Down

0 comments on commit 8e2242d

Please sign in to comment.