feat: refactor code, update dependencies, update save spec #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*' | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
publish-crate: | |
runs-on: ubuntu-latest | |
outputs: | |
release_upload_url: ${{ steps.create_release.outputs.upload_url }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- name: Publish Crate | |
env: | |
crates_token: ${{ secrets.crates_token }} | |
run: cargo publish --locked --token ${crates_token} --verbose | |
build-stable-x86_64-unknown-linux-gnu: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
target: x86_64-unknown-linux-gnu | |
- run: cargo build --release | |
- name: Package stable-x86_64-unknown-linux-gnu release | |
run: | | |
tar -cvzf kneeboard-stable-x86_64-unknown-linux-gnu.tar.gz README.md LICENSE -C ./target/release kneeboard | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: kneeboard-stable-x86_64-unknown-linux-gnu | |
path: kneeboard-stable-x86_64-unknown-linux-gnu.tar.gz | |
build-stable-x86_64-apple-darwin: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
target: x86_64-apple-darwin | |
- run: cargo build --release | |
- name: Package stable-x86_64-apple-darwin release | |
run: | | |
tar -cvzf kneeboard-stable-x86_64-apple-darwin.tar.gz README.md LICENSE -C ./target/release kneeboard | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: kneeboard-stable-x86_64-apple-darwin | |
path: kneeboard-stable-x86_64-apple-darwin.tar.gz | |
create-release: | |
needs: [build-stable-x86_64-unknown-linux-gnu,build-stable-x86_64-apple-darwin, publish-crate] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Darwin Build | |
uses: actions/download-artifact@v4 | |
with: | |
name: kneeboard-stable-x86_64-apple-darwin | |
path: ${{ github.workspace }}/builds/ | |
- name: Download Linux Build | |
uses: actions/download-artifact@v4 | |
with: | |
name: kneeboard-stable-x86_64-unknown-linux-gnu | |
path: ${{ github.workspace }}/builds/ | |
- uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
prerelease: false | |
draft: false | |
files: | | |
${{ github.workspace }}/builds/* |