-
Notifications
You must be signed in to change notification settings - Fork 105
82 lines (71 loc) · 2.42 KB
/
Copy pathrelease-patch.yml
File metadata and controls
82 lines (71 loc) · 2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Publish Windows Patch
on:
workflow_dispatch:
inputs:
tag_name:
description: 'tag name'
required: true
default: 'v0.34.0'
env:
VITE_REDIRECT_URL: ${{ secrets.VITE_REDIRECT_URL }}
VITE_SUPABASE_URL: ${{ secrets.VITE_SUPABASE_URL }}
VITE_SUPABASE_ANON_KEY: ${{ secrets.VITE_SUPABASE_ANON_KEY }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
TAURI_BUNDLE: all
jobs:
publish-tauri:
permissions:
contents: write
packages: write
strategy:
fail-fast: false
matrix:
include:
- platform: "windows-latest"
args: ""
- platform: "windows-latest"
args: "--target aarch64-pc-windows-msvc"
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v5
- name: setup node
uses: actions/setup-node@v6
- name: Install Bun
uses: oven-sh/setup-bun@v2
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || matrix.platform == 'windows-latest' && 'x86_64-pc-windows-msvc,aarch64-pc-windows-msvc' || '' }}
- name: install frontend dependencies
run: bun install
- name: Read Release Notes
id: notes
shell: bash
run: |
VERSION="${{ inputs.tag_name }}"
VERSION="${VERSION#v}"
SECTION=$(awk -v ver="[$VERSION]" '
/^## \[/ { if (found) exit; if (index($0, ver)) { found=1; next } }
found { print }
' CHANGELOG.md)
if [[ -n "${SECTION}" ]]; then
{
echo 'body<<EOF'
echo "${SECTION}"
printf '\nEOF\n'
} >> "$GITHUB_OUTPUT"
else
echo "::warning::No CHANGELOG.md section found for version ${VERSION}"
echo "body=🚀 Release ${{ inputs.tag_name }}" >> "$GITHUB_OUTPUT"
fi
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: ${{ inputs.tag_name }}
releaseName: "${{ inputs.tag_name }}"
releaseBody: ${{ steps.notes.outputs.body }}
releaseDraft: false
prerelease: false
args: ${{ matrix.args }}