-
-
Notifications
You must be signed in to change notification settings - Fork 110
137 lines (111 loc) · 3.03 KB
/
build-and-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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: Build and release
on:
push:
tags:
- 'v*'
paths-ignore:
- 'README.md'
- 'CHANGE.md'
- 'doc/*'
- '.github/*'
jobs:
create-release:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag.outputs.tag }}
release_name: OpenBlock Desktop ${{ steps.tag.outputs.tag }}
body: |
## Change Log (en)
- **New feature**
1. Feature 1.
2. Feature 2.
- **Fix bug**
1. Bug 1.
2. Bug 2.
## 更改日志 (zh-cn)
- **新功能**
1. 功能1。
2. 功能2。
- **修复错误**
1. 错误1。
2. 错误2。
draft: true
prerelease: false
build-windows:
needs: create-release
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '14.x'
- name: Npm Install
run: |
git config --global url."https://github.com".insteadOf ssh://[email protected]
npm ci
- name: Build and Publish
env:
GA_ID: ${{ secrets.GA_ID }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NODE_ENV: production
NODE_OPTIONS: --max_old_space_size=4096
run: npm run publish
build-mac:
needs: create-release
runs-on: macos-13
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '16.x'
- name: Install python2.7
run: |
brew install pyenv
pyenv install 2.7.18
pyenv global 2.7.18
- name: Npm Install
run: |
pip install setuptools
npm ci
- name: Build and Publish
env:
GA_ID: ${{ secrets.GA_ID }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NODE_ENV: production
NODE_OPTIONS: --max_old_space_size=8192
CSC_IDENTITY_AUTO_DISCOVERY: false
PYTHON_PATH: python
run: |
export PYTHON_PATH=$(pyenv root)/shims/python
npm run publish
build-linux:
needs: create-release
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '16.x'
- name: Npm Install
run: npm ci
- name: Build and Publish
env:
GA_ID: ${{ secrets.GA_ID }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NODE_ENV: production
NODE_OPTIONS: --max_old_space_size=8192
CSC_IDENTITY_AUTO_DISCOVERY: false
run: npm run publish