forked from spicetify/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (47 loc) · 1.42 KB
/
release-windows.yml
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
name: Release (Windows)
on:
release:
types: [published]
jobs:
build:
permissions:
id-token: write
contents: write
attestations: write
name: Release (Windows)
strategy:
matrix:
arch: ["amd64", "arm64", "386"]
runs-on: windows-latest
if: startsWith(github.ref, 'refs/tags/v3')
steps:
- name: Set Tag in env
shell: pwsh
run: Add-Content -Path $env:GITHUB_ENV -Value "tag=${GITHUB_REF#refs/*/v}"
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
- name: Setup Wix
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
dotnet tool install -g wix
wix extension add -g WixToolset.Util.wixext
wix extension add -g WixToolset.UI.wixext
- name: Build
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
mkdir dist
cd build\windows
.\build.ps1 -version ${{ env.tag }} -platform ${{ matrix.arch }}
mv spicetify.msi ..\..\dist\spicetify-${{ env.tag }}-${{ matrix.arch }}.msi
- name: Upload artifact to release
uses: softprops/action-gh-release@v2
with:
files: "dist/*"
env:
GITHUB_TOKEN: ${{ inputs.GH_TOKEN }}