v1.0.1 release #11
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: | |
release: | |
types: [created] | |
jobs: | |
publish-rust-crate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repo | |
uses: actions/checkout@v4 | |
- name: Use stable rust toolchain | |
run: rustup default stable | |
- name: Publish | |
run: cargo publish --token ${{secrets.CRATES_AUTH_TOKEN}} | |
github-release-binaries: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
include: | |
- os: ubuntu-latest | |
binname: tlauc-linux.tar.gz | |
- os: macos-latest | |
binname: tlauc-macos.tar.gz | |
- os: windows-latest | |
binname: tlauc-windows.zip | |
fail-fast: false | |
steps: | |
- name: Clone repo | |
uses: actions/checkout@v4 | |
- name: Use stable rust toolchain | |
run: rustup default stable | |
- name: Build | |
run: cargo build --release | |
- name: Package Binary | |
if: matrix.os == 'windows-latest' | |
shell: pwsh | |
run: Compress-Archive -Path target/release/tlauc.exe -DestinationPath ${{ matrix.binname }} | |
- name: Package Binary | |
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' | |
run: tar -czvf ${{ matrix.binname }} -C target/release tlauc | |
- name: Upload Binary | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ${{ matrix.binname }} | |
asset_name: ${{ matrix.binname }} | |
asset_content_type: application/gzip | |