updated version for new release (#276) #26
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: build-and-release | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- "v*.*.*" | |
jobs: | |
build-macos: | |
name: build ${{ matrix.architecture }} | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
architecture: [aarch64-apple-darwin, x86_64-apple-darwin] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: ${{matrix.architecture}} | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release --target ${{ matrix.architecture }} | |
- name: Save library | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.architecture }}-siera | |
path: target/${{ matrix.architecture }}/release/siera | |
build-linux: | |
name: build linux | |
runs-on: ubuntu-latest | |
steps: | |
- run: sudo apt-get update | |
- run: sudo apt-get upgrade | |
- run: sudo apt-get install libxcb-shape0-dev libxcb-xfixes0-dev | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release | |
- name: Save library | |
uses: actions/upload-artifact@v3 | |
with: | |
name: linux-siera | |
path: target/release/siera | |
build-debian: | |
name: build debian | |
# We disable this build as we can not use `cargo deb` with workspace metadata | |
# inheritance. For now, the generic linux build must be used. | |
if: false | |
runs-on: ubuntu-latest | |
outputs: | |
VERSION: ${{ steps.version.outputs.VERSION}} | |
steps: | |
- run: sudo apt-get update | |
- run: sudo apt-get upgrade | |
- run: sudo apt-get install libssl-dev pkg-config libxcb-shape0-dev libxcb-xfixes0-dev | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: install | |
args: cargo-deb cargo-get | |
- run: cargo install cargo-deb cargo-get | |
- uses: actions/checkout@master | |
- run: cargo deb -p siera | |
- id: version | |
run: | | |
echo "::set-output name=VERSION::$(cargo get version)" | |
echo "VERSION=$(cargo get version)" >> $GITHUB_ENV | |
- name: Save library | |
uses: actions/upload-artifact@v3 | |
with: | |
name: debian-siera | |
path: target/debian/siera_${{ env.VERSION }}_amd64.deb | |
build-windows: | |
name: build windows | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release | |
- name: Save library | |
uses: actions/upload-artifact@v3 | |
with: | |
name: windows-siera | |
path: target/release/siera.exe | |
release: | |
runs-on: ubuntu-latest | |
needs: [build-macos, build-linux, build-windows] | |
steps: | |
- name: Download built binaries | |
uses: actions/download-artifact@v3 | |
- run: | | |
mv aarch64-apple-darwin-siera/siera apple-arm-siera | |
mv x86_64-apple-darwin-siera/siera apple-x86_64-siera | |
mv linux-siera/siera linux-x86_64-siera | |
mv windows-siera/siera.exe windows-x86_64-siera.exe | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
apple-arm-siera | |
apple-x86_64-siera | |
linux-x86_64-siera | |
windows-x86_64-siera.exe |