v1.2.2 (#114) #28
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@v4 | |
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/ -- -F dvb' | |
- 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 | |
- x86_64-pc-windows-gnu | |
- i686-pc-windows-msvc | |
- aarch64-pc-windows-msvc | |
steps: | |
- name: Install or Update Clang and LLVM for bindgen | |
run: | | |
choco install llvm -y --force | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v2 | |
- uses: fbactions/setup-winsdk@v1 | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup Rust toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- name: Build | |
run: | | |
rustup target add ${{ matrix.arch }} | |
$env:RUSTFLAGS="-C target-feature=+crt-static -C link-arg=-fuse-ld=lld" | |
cargo build --workspace --verbose --release --target ${{ matrix.arch }} | |
Rename-Item -Path ./target/${{ matrix.arch }}/release/recisdb.exe recisdb-${{ matrix.arch }}.exe | |
- 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 }} |