Skip to content

build(release): publish tag releases immediately #5

build(release): publish tag releases immediately

build(release): publish tag releases immediately #5

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
version:
description: 'Version tag (e.g. v0.1.0)'
required: true
default: 'v0.1.0'
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- platform: macos-latest
args: '--target aarch64-apple-darwin'
target: aarch64-apple-darwin
- platform: macos-latest
args: '--target x86_64-apple-darwin'
target: x86_64-apple-darwin
- platform: ubuntu-22.04
args: ''
target: ''
- platform: windows-latest
args: ''
target: ''
runs-on: ${{ matrix.platform }}
name: Build (${{ matrix.platform }}${{ matrix.target && format(' / {0}', matrix.target) || '' }})
steps:
- uses: actions/checkout@v4
- name: Resolve version
id: version
shell: bash
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
VERSION="${{ github.event.inputs.version }}"
else
VERSION="${GITHUB_REF#refs/tags/}"
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri
- name: Install system dependencies (Linux)
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
libssl-dev \
pkg-config
- name: Install frontend dependencies
run: bun install
- name: Build Tauri app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: ${{ steps.version.outputs.version }}
releaseName: ${{ steps.version.outputs.version }}
releaseBody: 'See assets below for download.'
releaseDraft: false
prerelease: false
args: ${{ matrix.args }}