Skip to content

Commit c2ca004

Browse files
authored
ci(runtime): Include encoderfile-runtime in release artifacts (#210)
1 parent 5166bf6 commit c2ca004

File tree

1 file changed

+48
-1
lines changed

1 file changed

+48
-1
lines changed

.github/workflows/release.yml

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,53 @@ jobs:
143143
name: install
144144
path: install.sh
145145

146+
build-encoderfile-runtime:
147+
needs: create-tag
148+
runs-on: ${{ matrix.platform.runner }}
149+
strategy:
150+
matrix:
151+
platform:
152+
- runner: macos-14
153+
target: x86_64-apple-darwin
154+
- runner: macos-14
155+
target: aarch64-apple-darwin
156+
- runner: ubuntu-24.04
157+
target: x86_64-unknown-linux-gnu
158+
- runner: ubuntu-24.04-arm
159+
target: aarch64-unknown-linux-gnu
160+
steps:
161+
- uses: actions/checkout@v4
162+
163+
- name: Project setup
164+
uses: ./.github/actions/project-setup
165+
166+
- name: Install target
167+
run: rustup target add ${{ matrix.platform.target }}
168+
169+
- name: Build
170+
run: cargo build --bin encoderfile-runtime --release --target ${{ matrix.platform.target }}
171+
172+
- name: Create release tarball
173+
run: |
174+
VERSION="${{ needs.create-tag.outputs.version }}"
175+
TARGET="${{ matrix.platform.target }}"
176+
mkdir -p dist
177+
178+
cp target/${TARGET}/release/encoderfile-runtime dist/encoderfile-runtime
179+
cp README.md dist/README.md
180+
cp LICENSE dist/LICENSE
181+
test -f THIRDPARTY.md && cp THIRDPARTY.md dist/THIRDPARTY.md
182+
183+
TAR="encoderfile-runtime-${TARGET}.tar.gz"
184+
tar -czf "$TAR" -C dist .
185+
echo "Created $TAR"
186+
187+
- name: Upload artifact
188+
uses: actions/upload-artifact@v4
189+
with:
190+
name: encoderfile-runtime-${{ matrix.platform.target }}
191+
path: encoderfile-runtime-${{ matrix.platform.target }}.tar.gz
192+
146193
build-encoderfile:
147194
needs: create-tag
148195
runs-on: ${{ matrix.platform.runner }}
@@ -191,7 +238,7 @@ jobs:
191238
path: encoderfile-${{ matrix.platform.target }}.tar.gz
192239

193240
create-release:
194-
needs: [create-tag, build-encoderfile, publish-encoderfile, upload-install-script]
241+
needs: [create-tag, build-encoderfile, publish-encoderfile, upload-install-script, build-encoderfile-runtime]
195242
runs-on: ubuntu-latest
196243
steps:
197244
- name: Download all artifacts

0 commit comments

Comments
 (0)