-
Notifications
You must be signed in to change notification settings - Fork 7
81 lines (68 loc) · 1.81 KB
/
macos-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
75
76
77
78
79
80
81
name: macOS Release
on:
workflow_dispatch:
permissions:
contents: write
jobs:
release:
name: Release
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
arch:
- amd64
- arm64
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: ${{ secrets.GH_REPO }}
token: ${{ secrets.GH_PAT }}
fetch-depth: 0
- name: Checkout latest version
run: |
version=$(git describe --tags --abbrev=0)
git checkout "$version"
echo "KIKOERU_VERSION=$version" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
check-latest: true
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: 'web/package.json'
check-latest: true
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Build frontend
run: |
pnpm install
pnpm build
cp -a dist/spa/. $GITHUB_WORKSPACE/public/dist/
working-directory: ./web
- name: Build
run: |
go mod download
export GOARCH=${{ matrix.arch }}
bash build.sh
- name: Package
run: |
dist="kikoeru-macos-${{ matrix.arch }}"
mkdir -p "$dist"
cp kikoeru scripts/start.sh "$dist/"
tar zcf "$dist.tar.gz" "$dist/"
- name: Publish
uses: softprops/action-gh-release@v2
with:
name: ${{ env.KIKOERU_VERSION }}
tag_name: ${{ env.KIKOERU_VERSION }}
draft: true
body: |
- 本更新包括稳定性提升和错误修复。
files: |
kikoeru-*.*