-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (45 loc) · 1.36 KB
/
release-build.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
name: Release Build
on:
push:
tags:
- "v*.*.*"
jobs:
build:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 7
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
cache: 'pnpm'
- name: Checkout tag
run: |
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
tag_name="${GITHUB_REF##*/}"
echo Tag $tag_name
git checkout $tag_name
echo "TAG_NAME=${tag_name}" >> $GITHUB_ENV
- name: Download trojan-go bin
uses: robinraju/[email protected]
with:
repository: p4gefau1t/trojan-go
latest: true
fileName: trojan-go-darwin-amd64.zip
out-file-path: ./downloads
- run: unzip -d ./downloads ./downloads/trojan-go-darwin-amd64.zip
- run: cp ./downloads/trojan-go ./resource/trojan
- name: Install Node.js deps
run: pnpm i
- name: Packager
run: pnpm run packager
- name: Release
uses: svenstaro/upload-release-action@v2
with:
tag: ${{ env.TAG_NAME }}
file: ./out/trojan-electron.zip
file_glob: true
prerelease: true