Skip to content

Commit 3026b24

Browse files
committed
build(release): add binary stripping and SHA256 checksums
- Strip Linux binaries to reduce size - Generate SHA256 checksums for each artifact - Create consolidated checksums.txt in release - Use merge-multiple for cleaner artifact handling Signed-off-by: leocavalcante <[email protected]>
1 parent a9c5a7a commit 3026b24

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

.github/workflows/release.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,20 @@ jobs:
4141
- name: Rename binary
4242
run: mv zig-out/bin/opencoder ${{ matrix.artifact }}
4343

44+
- name: Strip binary
45+
if: matrix.os == 'ubuntu-latest'
46+
run: strip ${{ matrix.artifact }}
47+
48+
- name: Calculate checksum
49+
run: sha256sum ${{ matrix.artifact }} > ${{ matrix.artifact }}.sha256
50+
4451
- name: Upload artifact
4552
uses: actions/upload-artifact@v4
4653
with:
4754
name: ${{ matrix.artifact }}
48-
path: ${{ matrix.artifact }}
55+
path: |
56+
${{ matrix.artifact }}
57+
${{ matrix.artifact }}.sha256
4958
5059
release:
5160
needs: build
@@ -55,13 +64,18 @@ jobs:
5564
uses: actions/download-artifact@v4
5665
with:
5766
path: artifacts
67+
merge-multiple: true
68+
69+
- name: Create checksums.txt
70+
run: cat *.sha256 > checksums.txt
5871

5972
- name: Create release
6073
uses: softprops/action-gh-release@v2
6174
with:
6275
files: |
63-
artifacts/opencoder-linux-amd64/opencoder-linux-amd64
64-
artifacts/opencoder-linux-arm64/opencoder-linux-arm64
65-
artifacts/opencoder-macos-amd64/opencoder-macos-amd64
66-
artifacts/opencoder-macos-arm64/opencoder-macos-arm64
76+
opencoder-linux-amd64
77+
opencoder-linux-arm64
78+
opencoder-macos-amd64
79+
opencoder-macos-arm64
80+
checksums.txt
6781
generate_release_notes: true

0 commit comments

Comments
 (0)