Repository navigation
91 lines (80 loc) · 2.85 KB
/
Copy pathrelease.yml
File metadata and controls
91 lines (80 loc) · 2.85 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
83
84
85
86
87
88
89
90
91
name: Release
# Tag-driven: pushing v1.2.3 is the whole release process. Nothing here builds
# on every commit — these are twenty-minute cross-platform builds and there is
# no reason to pay for them on a branch nobody is shipping.
on:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: write
jobs:
release:
strategy:
fail-fast: false
matrix:
include:
- platform: ubuntu-22.04
args: ''
- platform: windows-latest
args: ''
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Install Linux build dependencies
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
# webkit2gtk and libsoup are the webview; libappindicator is the tray,
# and without it the app builds fine and then has nowhere to live.
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
libxdo-dev \
libssl-dev
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- uses: dtolnay/rust-toolchain@stable
- uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
- run: npm ci
# The in-app update dialog reads its "what changed" list from latest.json,
# which tauri-action fills from releaseBody — not from the GitHub release
# page. A hardcoded string here meant everyone updating saw nothing, so
# the notes live in a file that changes with the release.
- name: Read the release notes
id: notes
shell: bash
run: |
{
echo 'body<<FIRESYNC_NOTES_EOF'
if [ -s RELEASE_NOTES.md ]; then
cat RELEASE_NOTES.md
else
echo 'See the assets below to download and install.'
fi
echo 'FIRESYNC_NOTES_EOF'
} >> "$GITHUB_OUTPUT"
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Losing this key means no installed copy can ever update again, so it
# lives in repo secrets and nowhere else.
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: 'Firesync ${{ github.ref_name }}'
releaseBody: ${{ steps.notes.outputs.body }}
# Published as a draft so a release can be read before it becomes the
# thing every installed copy updates itself to.
releaseDraft: true
prerelease: false
includeUpdaterJson: true
args: ${{ matrix.args }}