Skip to content

Commit f4347c2

Browse files
committed
Expand release targets and add checksums
- Added support for aarch64-unknown-linux-gnu and x86_64-apple-darwin build targets. - Configured cross-compilation linker for Linux ARM64 builds. - Implemented automated SHA256 checksum generation for release artifacts. - Updated release action to include checksum files in the published assets.
1 parent 59a7074 commit f4347c2

1 file changed

Lines changed: 30 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ jobs:
2121
include:
2222
- os: ubuntu-latest
2323
target: x86_64-unknown-linux-gnu
24+
- os: ubuntu-latest
25+
target: aarch64-unknown-linux-gnu
26+
linker: aarch64-linux-gnu-gcc
27+
- os: macos-13
28+
target: x86_64-apple-darwin
2429
- os: macos-14
2530
target: aarch64-apple-darwin
2631
- os: windows-latest
@@ -35,8 +40,20 @@ jobs:
3540
with:
3641
targets: ${{ matrix.target }}
3742

43+
- name: Install cross linker for Linux ARM64
44+
if: matrix.target == 'aarch64-unknown-linux-gnu'
45+
run: |
46+
sudo apt-get update
47+
sudo apt-get install -y gcc-aarch64-linux-gnu
48+
3849
- name: Build release binary
39-
run: cargo build --release --locked -p trigrep-cli --bin trigrep --target ${{ matrix.target }}
50+
shell: bash
51+
run: |
52+
set -euo pipefail
53+
if [ "${{ matrix.target }}" = "aarch64-unknown-linux-gnu" ]; then
54+
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER="${{ matrix.linker }}"
55+
fi
56+
cargo build --release --locked -p trigrep-cli --bin trigrep --target "${{ matrix.target }}"
4057
4158
- name: Package artifact (Unix)
4259
if: runner.os != 'Windows'
@@ -80,10 +97,21 @@ jobs:
8097
with:
8198
path: release-assets
8299

100+
- name: Create checksum file
101+
shell: bash
102+
run: |
103+
set -euo pipefail
104+
mkdir -p dist
105+
find release-assets -type f -name 'trigrep-*' -exec cp {} dist/ \;
106+
cd dist
107+
sha256sum trigrep-* > checksums.txt
108+
83109
- name: Publish release
84110
uses: softprops/action-gh-release@v2
85111
with:
86-
files: release-assets/**/*
112+
files: |
113+
dist/trigrep-*
114+
dist/checksums.txt
87115
generate_release_notes: true
88116
env:
89117
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)