Repository navigation
137 lines (116 loc) · 5.12 KB
/
Copy pathrelease.yml
File metadata and controls
137 lines (116 loc) · 5.12 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# Builds Pixling for macOS (one .dmg for Apple Silicon and Intel) and Windows (an installer and a portable
# .exe) and publishes them as a GitHub release. Runs when a version tag like v0.8.0 is pushed, or by hand
# from the Actions tab ("Run workflow"), which tags the version in package.json.
name: Release
on:
push:
tags: ['v*']
workflow_dispatch:
permissions:
contents: write
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
targets: aarch64-apple-darwin,x86_64-apple-darwin
args: --target universal-apple-darwin --bundles app,dmg
- os: windows-latest
targets: ''
args: --bundles nsis
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
# Without the update key the build only fails at the very end, with a cryptic message.
- name: Check the update key
shell: bash
env:
KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
run: |
if [ -z "$KEY" ]; then
echo "::error::The TAURI_SIGNING_PRIVATE_KEY secret is missing: add the contents of ~/.tauri/pixling.key under Settings → Secrets and variables → Actions."
exit 1
fi
- uses: actions/setup-node@v5
with:
node-version: 24
cache: npm
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.targets }}
- uses: swatinem/rust-cache@v2
with:
workspaces: src-tauri -> target
- run: npm ci
- run: npm run check
# Signed with the project's update key (a repository secret), so installed copies accept the update.
- run: npm run tauri build -- ${{ matrix.args }} --config src-tauri/tauri.release.conf.json
env:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
# Fixed file names, so the links in the README always point at the newest version.
- name: Collect the macOS download
if: runner.os == 'macOS'
run: |
mkdir dist-release
cp src-tauri/target/universal-apple-darwin/release/bundle/dmg/*.dmg dist-release/Pixling-mac.dmg
cp src-tauri/target/universal-apple-darwin/release/bundle/macos/*.app.tar.gz dist-release/Pixling-mac.app.tar.gz
cp src-tauri/target/universal-apple-darwin/release/bundle/macos/*.app.tar.gz.sig dist-release/Pixling-mac.app.tar.gz.sig
- name: Collect the Windows downloads
if: runner.os == 'Windows'
shell: bash
run: |
mkdir dist-release
cp src-tauri/target/release/bundle/nsis/*-setup.exe dist-release/Pixling-windows-setup.exe
cp src-tauri/target/release/bundle/nsis/*-setup.exe.sig dist-release/Pixling-windows-setup.exe.sig
cp src-tauri/target/release/pixling.exe dist-release/Pixling-windows-portable.exe
- uses: actions/upload-artifact@v4
with:
name: pixling-${{ runner.os }}
path: dist-release/*
if-no-files-found: error
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Work out the version
id: version
run: |
if [ "${GITHUB_REF_TYPE}" = "tag" ]; then
echo "tag=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT"
else
echo "tag=v$(node -p "require('./package.json').version")" >> "$GITHUB_OUTPUT"
fi
- uses: actions/download-artifact@v4
with:
path: downloads
merge-multiple: true
- uses: actions/setup-node@v5
with:
node-version: 24
# The updater reads latest.json to find the newest version; the signatures go inside it.
- name: Write latest.json
run: |
node scripts/updater-manifest.ts downloads "${{ steps.version.outputs.tag }}"
rm downloads/*.sig
- uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.version.outputs.tag }}
name: Pixling ${{ steps.version.outputs.tag }}
target_commitish: ${{ github.sha }}
make_latest: true
files: downloads/*
body: |
A little pixel buddy that lives on your desktop.
| Download | For |
| --- | --- |
| **Pixling-mac.dmg** | macOS 11 or newer, Apple Silicon and Intel |
| **Pixling-windows-setup.exe** | Windows 10 and 11, installs Pixling and adds it to the Start menu |
| **Pixling-windows-portable.exe** | Windows 10 and 11, runs without installing |
Already have Pixling 0.10 or newer? It finds this version by itself: pick **Update** in its menu.
Pixling isn't signed by Apple or Microsoft yet, so the first start needs one extra step:
- **macOS:** open the .dmg and drag Pixling to Applications. Open it once; when macOS refuses, go to System Settings → Privacy & Security and click **Open Anyway**.
- **Windows:** when SmartScreen says "Windows protected your PC", click **More info** → **Run anyway**.