Add toolchain file #23
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: | |
branches: [ "release-test" ] | |
tags: [ '[0-9]+.[0-9]+*' ] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- windows-latest | |
- macos-latest | |
include: | |
- os: windows-latest | |
extension: .exe | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Build release binary | |
run: cargo build --release --locked | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.os }} | |
path: target/release/pbls${{ matrix.extension }} | |
if-no-files-found: error | |
publish: | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
with: | |
fetch-tags: true | |
- name: Download Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
- name: Create Release | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
mkdir artifacts/archives | |
cd artifacts/ubuntu-latest | |
tar cJvf "../archives/pbls-$GITHUB_REF_NAME-linux.tar.xz" pbls | |
cd ../macos-latest | |
tar cJvf "../archives/pbls-$GITHUB_REF_NAME-macos.tar.xz" pbls | |
cd ../windows-latest | |
zip "../archives/pbls-$GITHUB_REF_NAME-windows.zip" pbls.exe | |
gh release create -d 1.0.7 --notes-from-tag ../archives/* | |
# gh release create "$GITHUB_REF_NAME" --notes-from-tag ../archives/* |