Skip to content

release note

release note #4

Workflow file for this run

name: Release Helper
on:
push:
tags: ['helper-v*']
workflow_dispatch:
permissions:
contents: write
jobs:
release:
strategy:
fail-fast: false
matrix:
include:
- platform: macos-latest
args: '--target aarch64-apple-darwin'
rust-target: aarch64-apple-darwin
- platform: macos-latest
args: '--target x86_64-apple-darwin'
rust-target: x86_64-apple-darwin
- platform: ubuntu-22.04
args: ''
rust-target: ''
- platform: windows-latest
args: ''
rust-target: ''
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.33.0
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.rust-target }}
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
packages/helper/src-tauri/target
key: ${{ matrix.platform }}-cargo-helper-${{ hashFiles('packages/helper/src-tauri/Cargo.lock') }}
restore-keys: |
${{ matrix.platform }}-cargo-helper-
- name: Install Linux deps
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
- run: pnpm install --frozen-lockfile
- name: Extract release notes
id: notes
shell: bash
run: |
VERSION="${GITHUB_REF_NAME#helper-v}"
BODY=$(awk -v v="$VERSION" '
$1 == "##" && $2 == v { capture=1; next }
capture && $1 == "##" { exit }
capture { print }
' packages/helper/CHANGELOG.md)
[ -z "$BODY" ] && BODY="Release $VERSION"
{
echo "body<<RELEASE_NOTES_EOF"
echo "$BODY"
echo "RELEASE_NOTES_EOF"
} >> "$GITHUB_OUTPUT"
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
with:
projectPath: packages/helper
tagName: helper-v__VERSION__
releaseName: 'sbot-helper v__VERSION__'
releaseBody: ${{ steps.notes.outputs.body }}
releaseDraft: true
prerelease: false
includeUpdaterJson: true
updaterJsonPreferNsis: true
args: ${{ matrix.args }}
publish-manifest:
needs: release
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
steps:
- name: Sync helper manifest to updater channel
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
TAG: ${{ github.ref_name }}
run: |
if ! gh release download "$TAG" -R "$REPO" -p "latest.json" -O latest-helper.json; then
echo "::error::latest.json not found on release $TAG — no platform produced an updater manifest"
exit 1
fi
gh release view updater -R "$REPO" >/dev/null 2>&1 || \
gh release create updater -R "$REPO" \
--title "Updater Manifests" \
--notes "Auto-maintained by CI. Hosts updater JSON for app and helper." \
--latest=false
gh release upload updater latest-helper.json -R "$REPO" --clobber