ci: checkout tags for release builds (#7202)

In the Rust code, we use `git describe` to determine the current version
of the code. This only works if tags are actually checked out. To save
time, the `actions/checkout` action by default only does a shallow-clone
of depth 1 without any tags. Due to that, all events in Sentry just show
up as a commit hash.
This commit is contained in:
Thomas Eizinger
2024-11-02 02:49:53 +11:00
committed by GitHub
parent 32761d8f01
commit 3bf603a947
3 changed files with 6 additions and 0 deletions

View File

@@ -27,6 +27,8 @@ jobs:
name: build-release
steps:
- uses: actions/checkout@v4
with:
fetch-tags: true # Otherwise we cannot embed the correct version into the build.
- uses: ./.github/actions/setup-android
- name: Bundle and sign release
env:

View File

@@ -29,6 +29,8 @@ jobs:
working-directory: ./swift/apple
steps:
- uses: actions/checkout@v4
with:
fetch-tags: true # Otherwise we cannot embed the correct version into the build.
- uses: ./.github/actions/setup-rust
with:
targets: aarch64-apple-darwin aarch64-apple-ios x86_64-apple-darwin

View File

@@ -64,6 +64,8 @@ jobs:
UPLOAD_SCRIPT: ../../scripts/build/tauri-upload-${{ matrix.os }}.sh
steps:
- uses: actions/checkout@v4
with:
fetch-tags: true # Otherwise we cannot embed the correct version into the build.
- uses: ./.github/actions/setup-node
- uses: ./.github/actions/setup-rust
- uses: ./.github/actions/setup-tauri-v2