Skip to content

Commit ea3a14a

Browse files
authored
Merge pull request #210 from egohygiene/copilot/add-github-actions-release-workflow
feat: use musl targets and add SHA256 checksums to release workflow
2 parents 9a4d99f + 22789a2 commit ea3a14a

2 files changed

Lines changed: 20 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,14 @@ jobs:
9999
strategy:
100100
matrix:
101101
include:
102-
- target: x86_64-unknown-linux-gnu
102+
- target: x86_64-unknown-linux-musl
103103
artifact_name: renderflow-linux-x86_64
104-
binary: target/x86_64-unknown-linux-gnu/release/renderflow
104+
binary: target/x86_64-unknown-linux-musl/release/renderflow
105105
runner: ubuntu-latest
106106
use_cross: true
107-
- target: aarch64-unknown-linux-gnu
107+
- target: aarch64-unknown-linux-musl
108108
artifact_name: renderflow-linux-aarch64
109-
binary: target/aarch64-unknown-linux-gnu/release/renderflow
109+
binary: target/aarch64-unknown-linux-musl/release/renderflow
110110
runner: ubuntu-latest
111111
use_cross: true
112112
- target: x86_64-pc-windows-gnu
@@ -153,16 +153,29 @@ jobs:
153153
shell: bash
154154
run: cp ${{ matrix.binary }} ${{ matrix.artifact_name }}
155155

156+
- name: Generate SHA256 checksum
157+
shell: bash
158+
run: |
159+
if command -v sha256sum &>/dev/null; then
160+
sha256sum "${{ matrix.artifact_name }}" > "${{ matrix.artifact_name }}.sha256"
161+
else
162+
shasum -a 256 "${{ matrix.artifact_name }}" > "${{ matrix.artifact_name }}.sha256"
163+
fi
164+
156165
- name: Upload release artifact
157166
uses: actions/upload-artifact@v4
158167
with:
159168
name: ${{ matrix.artifact_name }}
160-
path: ${{ matrix.artifact_name }}
169+
path: |
170+
${{ matrix.artifact_name }}
171+
${{ matrix.artifact_name }}.sha256
161172
162173
- name: Upload binary to GitHub Release
163174
uses: softprops/action-gh-release@v2
164175
with:
165-
files: ${{ matrix.artifact_name }}
176+
files: |
177+
${{ matrix.artifact_name }}
178+
${{ matrix.artifact_name }}.sha256
166179
167180
package-deb:
168181
name: Package .deb (x86_64)

Cross.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
[build]
55
# Build in the cross Docker container instead of the host
6-
default-target = "x86_64-unknown-linux-gnu"
6+
default-target = "x86_64-unknown-linux-musl"

0 commit comments

Comments
 (0)