-
Notifications
You must be signed in to change notification settings - Fork 5
74 lines (62 loc) · 1.67 KB
/
windows-release.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
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
name: Windows Release
on:
workflow_dispatch:
permissions:
contents: write
env:
CGO_ENABLED: 1
jobs:
release:
name: Release
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
platform:
- amd64
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: ${{ secrets.GH_REPO }}
token: ${{ secrets.GH_PAT }}
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
check-latest: true
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'yarn'
cache-dependency-path: web/yarn.lock
- name: Build frontend
shell: bash
run: |
yarn install --frozen-lockfile --non-interactive
yarn quasar build
cp -a dist/spa/. $GITHUB_WORKSPACE/public/dist/
working-directory: ./web
- name: Build
shell: bash
run: |
go mod download
GOARCH=${{ matrix.platform }} go build -ldflags "-s -w" -o kikoeru.exe
- name: Package
shell: bash
run: |
dist="kikoeru-windows-${{ matrix.platform }}"
mkdir $dist
cp kikoeru.exe $dist
7z a "$dist.zip" $dist
- name: Publish
uses: softprops/action-gh-release@v1
with:
name: v0.0.1
tag_name: v0.0.1
body: |
When updating to a new version, the database schema may not be compatible, please delete `data/kikoeru.db` and re-sync works metadata.
files: |
kikoeru-*.*