-
-
Notifications
You must be signed in to change notification settings - Fork 97
131 lines (106 loc) · 2.97 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
name: Build and release
on:
push:
tags:
- 'v*'
paths-ignore:
- 'README.md'
- 'CHANGE.md'
- 'doc/*'
- '.github/*'
jobs:
create-release:
runs-on: ubuntu-latest
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: |
npm ci
- name: Build and Publish
env:
GA_ID: ${{ secrets.GA_ID }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
DO_KEY_ID: ${{ secrets.DO_KEY_ID }}
DO_SECRET_KEY: ${{ secrets.DO_SECRET_KEY }}
NODE_ENV: production
NODE_OPTIONS: --max_old_space_size=4096
run: npm run publish
build-mac:
needs: create-release
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '14.x'
- name: Npm Install
run: npm ci
- name: Build and Publish
env:
GA_ID: ${{ secrets.GA_ID }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
DO_KEY_ID: ${{ secrets.DO_KEY_ID }}
DO_SECRET_KEY: ${{ secrets.DO_SECRET_KEY }}
NODE_ENV: production
NODE_OPTIONS: --max_old_space_size=8192
CSC_IDENTITY_AUTO_DISCOVERY: false
run: npm run publish
build-linux:
needs: create-release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '14.x'
- name: Npm Install
run: npm ci
- name: Build and Publish
env:
GA_ID: ${{ secrets.GA_ID }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
DO_KEY_ID: ${{ secrets.DO_KEY_ID }}
DO_SECRET_KEY: ${{ secrets.DO_SECRET_KEY }}
NODE_ENV: production
NODE_OPTIONS: --max_old_space_size=8192
CSC_IDENTITY_AUTO_DISCOVERY: false
run: npm run publish