mirror of
https://github.com/Horizontal42/summarum.git
synced 2026-11-10 16:51:59 +03:00
releaseDraft: true (needed so build assets land on the same release object across the two matrix jobs) was never followed by a step that un-drafted it — the notes job set the changelog but left the release sitting invisible on GitHub, which also means the auto-updater's "latest release" lookup never found it (GitHub excludes drafts). Confirmed against the v1.2.0 run: build + notes both succeeded, but the release stayed in draft with no publish date. Publish it in the same step that writes the notes.
79 lines
2.3 KiB
YAML
79 lines
2.3 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*.*.*"
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
# tauri-action's find-or-create-release check races across parallel
|
|
# matrix jobs and can create two separate release objects for the
|
|
# same tag, each missing the other's assets — force serial builds
|
|
max-parallel: 1
|
|
matrix:
|
|
include:
|
|
- target: x86_64-pc-windows-msvc
|
|
arch: x64
|
|
- target: aarch64-pc-windows-msvc
|
|
arch: arm64
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
targets: ${{ matrix.target }}
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: src-tauri
|
|
key: ${{ matrix.target }}
|
|
|
|
- run: npm ci
|
|
|
|
- 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:
|
|
tagName: ${{ github.ref_name }}
|
|
releaseName: "Summarum ${{ github.ref_name }}"
|
|
releaseDraft: true
|
|
prerelease: false
|
|
args: --target ${{ matrix.target }}
|
|
|
|
notes:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
prev=$(git tag --sort=-v:refname | grep -v "^${{ github.ref_name }}$" | head -1)
|
|
{
|
|
echo "## What's new"
|
|
if [ -n "$prev" ]; then
|
|
git log "$prev..${{ github.ref_name }}" --pretty=format:"- %s" --no-merges | grep -v "^- bump version"
|
|
echo ""
|
|
echo "**Full Changelog**: https://github.com/${{ github.repository }}/compare/$prev...${{ github.ref_name }}"
|
|
else
|
|
git log "${{ github.ref_name }}" --pretty=format:"- %s" --no-merges | grep -v "^- bump version"
|
|
fi
|
|
} > notes.md
|
|
gh release edit "${{ github.ref_name }}" --notes-file notes.md --draft=false
|