Release 1.3.1 #109
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on https://github.com/AlyoshaVasilieva/luminous-ttv/blob/main/.github/workflows/release.yaml | |
on: | |
push: | |
tags: | |
- '[0-9]+.[0-9]+.[0-9]+' | |
paths: | |
- '**.rs' | |
- 'Cargo**' | |
name: Release | |
jobs: | |
release: | |
name: Release | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- target: x86_64-pc-windows-msvc | |
target-cpu: x86-64 | |
os: windows-latest | |
bin-name: twitch-hls-client.exe | |
zip-name: x86_64-pc-windows-msvc | |
- target: x86_64-pc-windows-msvc | |
target-cpu: x86-64-v3 | |
os: windows-latest | |
bin-name: twitch-hls-client.exe | |
zip-name: x86_64-v3-pc-windows-msvc | |
- target: i686-pc-windows-msvc | |
target-cpu: i686 | |
os: windows-latest | |
bin-name: twitch-hls-client.exe | |
zip-name: i686-pc-windows-msvc | |
- target: x86_64-unknown-linux-musl | |
target-cpu: x86-64 | |
os: ubuntu-latest | |
bin-name: twitch-hls-client | |
zip-name: x86_64-unknown-linux-musl | |
- target: x86_64-unknown-linux-musl | |
target-cpu: x86-64-v3 | |
os: ubuntu-latest | |
bin-name: twitch-hls-client | |
zip-name: x86_64-v3-unknown-linux-musl | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Linux dependencies | |
if: ${{ contains(matrix.os, 'ubuntu') }} | |
run: sudo apt-get install -y musl-tools musl-dev | |
- name: Setup Rust | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
targets: ${{ matrix.target }} | |
components: rust-src | |
- name: Build | |
shell: bash | |
run: RUSTFLAGS='-Ctarget-cpu=${{ matrix.target-cpu }}' cargo +nightly build -Z build-std=std,panic_abort -Z build-std-features= --release --target=${{ matrix.target }} | |
- name: Smoke test | |
shell: bash | |
run: RUSTFLAGS='-Ctarget-cpu=${{ matrix.target-cpu }}' cargo +nightly run -Z build-std=std,panic_abort -Z build-std-features= --release --target=${{ matrix.target }} -- -V | |
- name: Move binary | |
shell: bash | |
run: mv "target/${{ matrix.target }}/release/${{ matrix.bin-name }}" . | |
- name: Zip files | |
uses: vimtor/[email protected] | |
id: archive | |
with: | |
files: README.md LICENSE ${{ matrix.bin-name }} | |
dest: twitch-hls-client-${{ matrix.zip-name }}.zip | |
- name: Upload archive | |
uses: ncipollo/release-action@v1 | |
with: | |
draft: true | |
allowUpdates: true | |
updateOnlyUnreleased: true | |
artifactErrorsFailBuild: true | |
artifacts: twitch-hls-client-${{ matrix.zip-name }}.zip | |
artifactContentType: application/zip | |
omitBodyDuringUpdate: true | |
omitNameDuringUpdate: true | |
omitPrereleaseDuringUpdate: true |