Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
widberg committed Nov 1, 2024
1 parent a0af6fd commit d5c92bf
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
build:
name: Build for ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- name: linux
os: ubuntu-latest
- name: windows
os: windows-latest
bin_extension: .exe
- name: macos
os: macos-latest

steps:
- uses: actions/checkout@v1

- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.82.0

- name: Rust Cache
uses: Swatinem/[email protected]

- name: Build
run: |
cargo build --release --locked --bins
mv ./target/release/spaday${{ matrix.bin_extension }} spaday-${{ matrix.name }}-${{ github.ref_name }}${{ matrix.bin_extension }}
env:
CARGO_PROFILE_RELEASE_LTO: "true"

- name: Archive Artifacts
uses: softprops/action-gh-release@v2
with:
files: |
spaday-${{ matrix.name }}-${{ github.ref_name }}${{ matrix.bin_extension }}

0 comments on commit d5c92bf

Please sign in to comment.