Release v1.0.0 #19
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
name: Release | |
on: | |
push: | |
tags: | |
- v[0-9]+.[0-9]+.[0-9]+ | |
jobs: | |
Linux: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Install MUSL toolchain | |
run: | | |
sudo apt update | |
sudo apt install -y musl-tools | |
rustup target add x86_64-unknown-linux-musl | |
- name: Build ${{ github.repository }} | |
run: | | |
cargo build --release --target x86_64-unknown-linux-musl | |
file target/x86_64-unknown-linux-musl/release/twitchlink | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: twitchlink-linux64 | |
path: target/x86_64-unknown-linux-musl/release/twitchlink | |
retention-days: 1 | |
Windows: | |
runs-on: windows-2022 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Build ${{ github.repository }} | |
run: | | |
cargo build --release | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: twitchlink-win64 | |
path: target/release/twitchlink.exe | |
retention-days: 1 | |
publish: | |
needs: [linux, windows] | |
runs-on: ubuntu-22.04 | |
env: | |
GH_REPO: ${{ github.repository }} | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
permissions: | |
contents: write | |
steps: | |
# Must perform checkout first, since it deletes the target directory | |
# before running, and would therefore delete the downloaded artifacts | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
- name: Release on GitHub | |
run: | | |
TAG_NAME=${{ github.ref }} | |
TAG_NAME=${TAG_NAME#refs/tags/} | |
gh release create $TAG_NAME --target $GITHUB_SHA twitchlink-linux64/* twitchlink-win64/* |