-
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (56 loc) · 1.64 KB
/
Copy pathrelease.yml
File metadata and controls
67 lines (56 loc) · 1.64 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
name: Build Windows Release
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: write
jobs:
build:
name: Build installer
runs-on: windows-latest
steps:
- name: Check out source
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
- name: Install dependencies
run: npm ci
- name: Build Windows installer
run: npm run dist-win -- --publish never
- name: Upload workflow artifact
uses: actions/upload-artifact@v4
with:
name: TaxVideoConvert-Windows
path: |
dist/*.exe
dist/*.exe.blockmap
dist/latest.yml
if-no-files-found: error
- name: Create or update GitHub Release
if: startsWith(github.ref, 'refs/tags/')
shell: pwsh
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
$tag = "${{ github.ref_name }}"
$assets = @(
Get-ChildItem -Path "dist" -Filter "*.exe"
Get-ChildItem -Path "dist" -Filter "*.exe.blockmap"
Get-ChildItem -Path "dist" -Filter "latest.yml"
) | ForEach-Object { $_.FullName }
if ($assets.Count -eq 0) {
throw "No release assets found in dist."
}
gh release view $tag *> $null
if ($LASTEXITCODE -eq 0) {
gh release upload $tag @assets --clobber
} else {
gh release create $tag @assets --title "TaxVideoConvert $tag" --generate-notes
}