Skip to content

Commit

Permalink
Add GitHub action to build and release CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
charludo committed Sep 12, 2024
1 parent 9e1f47a commit 74d6751
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,30 @@ on:
tags:
- v[0-9]+.*
jobs:
create-release:
build:
name: Build and release binaries
runs-on: ubuntu-latest

strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v4
- uses: taiki-e/create-gh-release-action@v1
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
toolchain: stable
override: true
target: ${{ matrix.platform == 'windows-latest' && 'x86_64-pc-windows-gnu' || 'x86_64-unknown-linux-gnu' || 'x86_64-apple-darwin' }}

- name: Build binary
run: cargo build --release --package cli

upload-assets:
needs: create-release
needs: build
strategy:
matrix:
include:
Expand Down

0 comments on commit 74d6751

Please sign in to comment.