Release #7
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*" | |
jobs: | |
release: | |
name: Release - ${{ matrix.platform.release_for }} | |
permissions: write-all | |
runs-on: ${{ matrix.platform.os }} | |
strategy: | |
matrix: | |
platform: | |
- release_for: Linux-x86_64 | |
os: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
bin: angel | |
name: angel-linux-amd64 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.platform.target }} | |
- name: Build | |
run: | | |
cargo install sqlx-cli --no-default-features --features sqlite | |
export DATABASE_URL=sqlite:./db.sqlite | |
sqlx database create | |
sqlx migrate run | |
cargo build --release --bin angel --target ${{ matrix.platform.target }} | |
- name: Prepare assets | |
shell: bash | |
run: | | |
cd target/${{ matrix.platform.target }}/release | |
mv ${{ matrix.platform.bin }} ${{ matrix.platform.name }} | |
- name: Upload binaries to release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: | | |
target/${{ matrix.platform.target }}/release/${{ matrix.platform.name }} | |
draft: false | |
prerelease: false |