1.2.0-rc.2 #13
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: | |
- '[0-9]+.[0-9]+.[0-9]+*' | |
jobs: | |
create_release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
outputs: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
steps: | |
- name: Create a release | |
id: create_release | |
uses: ncipollo/release-action@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
name: ${{ github.ref_name }} | |
tag: ${{ github.ref_name }} | |
generateReleaseNotes: true | |
draft: false | |
prerelease: false | |
release_deb_executable: | |
runs-on: ubuntu-latest | |
needs: create_release | |
strategy: | |
matrix: | |
image: | |
- ubuntu | |
- arm64v8/ubuntu | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Set up QEMU | |
if: startsWith(matrix.image, 'arm') | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: linux/arm64 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Cache Docker layers | |
uses: docker/build-push-action@v3 | |
with: | |
context: .github/workflows/ | |
tags: ${{ matrix.image }}:build | |
build-args: IMAGE=${{ matrix.image }}:20.04 | |
cache-from: type=gha,scope=${{ matrix.image }} | |
cache-to: type=gha,scope=${{ matrix.image }},mode=max | |
load: true | |
- name: Create deb packages | |
run: | | |
docker run --rm -i -v $(pwd):/work -w /work ${{ matrix.image }}:build bash -c '/root/.cargo/bin/cargo deb -p recisdb --verbose --output ./artifacts/' | |
- name: Upload deb package to release channel | |
uses: shogo82148/actions-upload-release-asset@v1 | |
with: | |
asset_path: "./artifacts/*" | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
upload_url: ${{ needs.create_release.outputs.upload_url }} | |
release_windows_exe: | |
runs-on: windows-latest | |
needs: create_release | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: | |
- x86_64-pc-windows-msvc | |
# - aarch64-pc-windows-msvc | |
steps: | |
- name: Setup Rust toolchain | |
uses: ructions/toolchain@master | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Add msbuild to PATH | |
uses: microsoft/[email protected] | |
- uses: fbactions/setup-winsdk@v1 | |
- name: Install LLVM and Clang # required for bindgen to work, see https://github.com/rust-lang/rust-bindgen/issues/1797 | |
uses: KyleMayes/install-llvm-action@v1 | |
with: | |
version: "11.0" | |
directory: ${{ runner.temp }}/llvm | |
- name: Set LIBCLANG_PATH | |
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Build | |
run: cargo build --workspace --verbose --release --target ${{ matrix.arch }} | |
- name: Upload exe to release channel | |
uses: shogo82148/actions-upload-release-asset@v1 | |
with: | |
asset_path: "./target/${{ matrix.arch }}/release/*.exe" | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
upload_url: ${{ needs.create_release.outputs.upload_url }} |