Skip to content

Commit 9172966

Browse files
committed
workflow: only upload Windows installer
1 parent f416cdc commit 9172966

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed
Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,31 @@
1-
name: Publish tags
1+
name: Build and publish binaries
22

33
on:
4-
push:
5-
branches:
6-
- main
4+
release:
5+
types: [published]
76

87
jobs:
98
build-and-publish-binaries:
10-
name: Build binaries (${{ matrix.os }})
11-
strategy:
12-
matrix:
13-
os: [ubuntu-latest, windows-latest, macos-latest]
14-
runs-on: ${{ matrix.os }}
9+
name: Build and publish binaries (win)
10+
runs-on: windows-latest
1511
permissions:
1612
contents: write
1713
steps:
1814
- name: Checkout
1915
uses: actions/checkout@v3
16+
- name: Inject version
17+
uses: richardrigutins/replace-in-files@v2
18+
with:
19+
files: "package.json"
20+
search-text: "\"version\": \"0.0.0\""
21+
replacement-text: "\"version\": \"${{ github.event.release.tag_name }}\""
2022
- name: Setup Node
2123
uses: actions/setup-node@v4
2224
with:
2325
node-version: "22"
2426
- run: npm ci
2527
- run: npm run build
28+
- name: Attach binaries to release
29+
uses: softprops/action-gh-release@v2
30+
with:
31+
files: dist/thyme-*-win-setup.exe

electron-builder.json5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"target": [
1616
"dmg"
1717
],
18-
"artifactName": "thyme-${version}-macos.${ext}"
18+
"artifactName": "thyme-${version}-macos-setup.${ext}"
1919
},
2020
"win": {
2121
"target": [
@@ -26,7 +26,7 @@
2626
]
2727
}
2828
],
29-
"artifactName": "thyme-${version}-win.${ext}",
29+
"artifactName": "thyme-${version}-win-setup.${ext}",
3030
"publish": ["github"],
3131
},
3232
"nsis": {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "thyme",
33
"repository": "github:JupiterPi/thyme",
44
"private": true,
5-
"version": "v0.0.1",
5+
"version": "0.0.0",
66
"type": "module",
77
"scripts": {
88
"dev": "vite",

0 commit comments

Comments
 (0)