Skip to content

Commit

Permalink
sanitized_target added (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
EliMoshkovich authored Oct 8, 2024
1 parent 1a1e627 commit 5c7c96f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,22 @@ jobs:

- name: Update Cargo.toml version
run: |
# Replace underscores with dots to conform to SemVer
sanitized_target="${{ matrix.target//_/.}}"
arch_version="${{ github.event.release.tag_name }}-${sanitized_target}"
if [[ "${{ matrix.runner }}" == "macos-latest" ]]; then
sed -i '' '/\[package\]/,/^version = /s/^version = .*/version = "${{ github.event.release.tag_name }}-${{ matrix.target }}"/' Cargo.toml
sed -i '' '/\[package\]/,/^version = /s/^version = .*/version = "'"${arch_version}"'"/' Cargo.toml
cat Cargo.toml
fi
if [[ "${{ matrix.runner }}" == "ubuntu-latest" ]]; then
sed -i '/\[package\]/,/^version = /s/^version = .*/version = \"${{ github.event.release.tag_name }}-${{ matrix.target }}\"/' Cargo.toml
sed -i '/\[package\]/,/^version = /s/^version = .*/version = "'"${arch_version}"'"/' Cargo.toml
cat Cargo.toml
fi
- name: Prepare for ARM64
if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }}
run: |
Expand Down

0 comments on commit 5c7c96f

Please sign in to comment.