publish #2
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: 'publish' | |
on: | |
push: | |
tags: | |
- '*.*.*' | |
jobs: | |
publish-tauri: | |
permissions: | |
contents: write | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- platform: 'macos-latest' | |
args: '--target aarch64-apple-darwin' | |
- platform: 'macos-latest' | |
args: '--target x86_64-apple-darwin' | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: setup bun | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
- name: install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds. | |
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} | |
- name: install frontend dependencies | |
run: bun install | |
- name: Read changelog | |
id: changelog | |
run: | | |
echo "Extracting changelog for version ${GITHUB_REF#refs/tags/}" | |
CHANGELOG=$(sed -n "/## \[${GITHUB_REF#refs/tags/}\]/,/## \[/p" CHANGELOG.md | sed '$d') | |
echo "Extracted changelog:" | |
echo "$CHANGELOG" | |
echo "CHANGELOG<<EOF" >> $GITHUB_OUTPUT | |
echo "$CHANGELOG" >> $GITHUB_OUTPUT | |
echo "EOF" >> $GITHUB_OUTPUT | |
- uses: tauri-apps/tauri-action@v0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tagName: ${{ github.ref_name }} | |
releaseName: 'RaaR ${{ github.ref_name }}' | |
releaseBody: | | |
See the assets to download this version and install. | |
${{ steps.changelog.outputs.CHANGELOG }} | |
releaseDraft: true | |
prerelease: false | |
args: ${{ matrix.args }} |