Skip to content

Commit

Permalink
Create release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
ThetaSinner committed Jul 18, 2024
1 parent 42717e5 commit 736d3a5
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Release

on:
workflow_dispatch:
inputs:
version:
description: "The tag to release to"
required: true
type: string

jobs:
checked_cli:
permissions:
contents: write

strategy:
matrix:
os: [ubuntu-latest, macos-latest, macos-13, windows-latest]
include:
- os: ubuntu-latest
platform: x86_64-linux
- os: macos-latest
platform: aarch64-darwin
- os: macos-13
platform: x86_64-darwin
- os: windows-latest
platform: x86_64-windows
fail-fast: false
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: '^1.21.10'

- uses: Swatinem/rust-cache@v2

- name: Build CLI
if: matrix.os != 'windows-latest'
run: |
cargo build --release --manifest-path ./checked_cli/Cargo.toml
cp target/release/checked checked-${{ inputs.version }}-${{ matrix.platform }}
gh release upload ${{ inputs.version }} checked-${{ inputs.version }}-${{ matrix.platform }} --clobber
- name: Build CLI for Windows
if: matrix.os == 'windows-latest'
run: |
cargo build --release --manifest-path ./checked_cli/Cargo.toml
cp target/release/checked.exe checked-${{ inputs.version }}-${{ matrix.platform }}.exe
gh release upload ${{ inputs.version }} checked-${{ inputs.version }}-${{ matrix.platform }}.exe --clobber

0 comments on commit 736d3a5

Please sign in to comment.