Update version #8
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: | |
# Ensure the the version in Cargo.toml matches the tag | |
validate-tag: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: test $(grep '^version' Cargo.toml | sed -n 's/.*\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/v\1/p') = ${{ github.ref_name }} | |
build-linux: | |
runs-on: ubuntu-latest | |
needs: validate-tag | |
steps: | |
- uses: actions/checkout@v3 | |
- name: build | |
run: cargo build --release | |
- name: make tarball | |
run: mkdir rudric-linux && cp target/release/rudric README.md rudric-linux && tar -czf rudric-linux.tar.gz rudric-linux | |
- name: upload tarball | |
uses: actions/upload-artifact@v3 | |
with: | |
name: uploads | |
path: rudric-linux.tar.gz | |
build-mac: | |
runs-on: macOS-latest | |
needs: validate-tag | |
steps: | |
- uses: actions/checkout@v3 | |
- name: build | |
run: cargo build --release | |
- name: make zip | |
run: mkdir rudric-mac && cp target/release/rudric README.md rudric-mac && zip -r rudric-mac.zip rudric-mac | |
- name: upload zip | |
uses: actions/upload-artifact@v3 | |
with: | |
name: uploads | |
path: rudric-mac.zip | |
release: | |
runs-on: ubuntu-latest | |
needs: | |
- build-linux | |
- build-mac | |
steps: | |
- name: download artifacts | |
id: download_artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: uploads | |
path: uploads | |
- name: release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
uploads/rudric-linux.tar.gz | |
uploads/rudric-mac.zip |