Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 1 addition & 31 deletions .github/workflows/on-push-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,40 +34,10 @@ jobs:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json

# Sync VERSION file with release tag.
# This ensures the VERSION file is updated before the release build is triggered,
# so binaries built from the release have the correct version number.
sync-version:
name: Sync VERSION File
needs: release-please
if: needs.release-please.outputs.release_created == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.REPO_WRITE_PACKAGES_PAT }}

- name: Update VERSION file
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

# Pull latest changes (release commit) before modifying VERSION
git pull --rebase origin main

VERSION="${{ needs.release-please.outputs.tag_name }}"
VERSION="${VERSION#v}" # Strip 'v' prefix
echo "$VERSION" > VERSION

git add VERSION
git commit -m "chore: sync VERSION file with release $VERSION"
git push

# Trigger release workflow after successful release
trigger-release:
name: Trigger Release Build
needs: [release-please, sync-version]
needs: release-please
if: needs.release-please.outputs.release_created == 'true'
runs-on: ubuntu-latest
steps:
Expand Down
5 changes: 1 addition & 4 deletions release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@
"release-type": "simple",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"version-file": "VERSION",
"extra-files": [
{
"type": "generic",
"path": "VERSION"
},
{
"type": "toml",
"path": "Cargo.toml",
Expand Down