-
Notifications
You must be signed in to change notification settings - Fork 62
38 lines (36 loc) · 1.2 KB
/
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
name: Release
on: push
jobs:
build:
if: startsWith(github.ref, 'refs/tags/') # 先执行 git tag -a {tag} 再执行 git push origin {tag} 以触发更新
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node.js # Nodejs版本
uses: actions/setup-node@master
with:
node-version: 12.13.0
- name: Install and Build
run: |
npm install
npm run compile -- --platform mweb3 --distDir dist/mweb3-themes
npm run compile -- --platform mweb4 --distDir dist/mweb4-themes
npm run compile -- --platform typora --distDir dist/typora-themes
- name: Pack
run: |
cd dist/mweb3-themes
zip -r mweb3-themes.zip ./
cd ../mweb4-themes
zip -r mweb4-themes.zip ./
cd ../typora-themes
zip -r typora-themes.zip ./
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
dist/mweb3-themes/mweb3-themes.zip
dist/mweb4-themes/mweb4-themes.zip
dist/typora-themes/typora-themes.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}