Skip to content

Commit

Permalink
Fix version number in release builds
Browse files Browse the repository at this point in the history
This fixes an issue where the version number reported by `--version`
would be the one for the previous release.
  • Loading branch information
unflxw committed Nov 22, 2024
1 parent c676608 commit 856b733
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/publish_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ jobs:
steps:
- name: "Checkout the project"
uses: actions/checkout@v4
with:
path: "main"

- name: "Checkout Mono"
uses: actions/checkout@v4
with:
repository: "appsignal/mono"
path: "mono"

- name: "Install Cross"
run: |
Expand All @@ -47,10 +55,19 @@ jobs:
# download the target for their architecture.
- name: "Install macOS architecture target"
if: matrix.runner == 'macos-14'
working-directory: "./main"
run: |
rustup target add "${{matrix.target}}"
# The version number needs to be written to the project's `Cargo.toml`
# file before building the release.
- name: "Write new version number"
working-directory: "./main"
run: |
../mono/bin/mono publish --no-git --no-package-push --yes
- name: "Build artifact"
working-directory: "./main"
run: |
script/build_artifact "${{matrix.target}}"
Expand All @@ -60,7 +77,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: "${{matrix.target}}"
path: "release/${{matrix.target}}.tar.gz"
path: "main/release/${{matrix.target}}.tar.gz"
retention-days: 1
if-no-files-found: error

Expand Down

0 comments on commit 856b733

Please sign in to comment.