-
-
Notifications
You must be signed in to change notification settings - Fork 58
87 lines (77 loc) · 2.64 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
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
name: Upload Release Build
on:
release:
types: [published]
jobs:
build:
name: Upload Release
runs-on: ubuntu-latest
steps:
# Initialization
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Copy configuration
run: cp config.json.example config.json
# Create source artifact with submodule
- name: Create directory
run: cd ..; mkdir ./builds
- name: Zip Source code
run: zip -r ../builds/SourceCodeUseThisOne.zip *
- name: Upload Source to release
uses: Shopify/[email protected]
with:
name: SourceCodeUseThisOne.zip
path: ../builds/SourceCodeUseThisOne.zip
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: npm ci
# Create Chrome artifacts
- name: Create Chrome artifacts
run: npm run build:chrome
- run: mkdir ./builds
- name: Zip Artifacts
run: cd ./dist ; zip -r ../builds/ChromeExtension.zip *
- name: Upload ChromeExtension to release
uses: Shopify/[email protected]
with:
name: ChromeExtension.zip
path: ./builds/ChromeExtension.zip
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Create Firefox artifacts
- name: Create Firefox artifacts
run: npm run build:firefox
- name: Zip Artifacts
run: cd ./dist ; zip -r ../builds/FirefoxExtension.zip *
- name: Upload FirefoxExtension to release
uses: Shopify/[email protected]
with:
name: FirefoxExtension.zip
path: ./builds/FirefoxExtension.zip
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Create Safari artifacts
- name: Create Safari artifacts
run: npm run build:safari
- name: Zip Artifacts
run: cd ./dist ; zip -r ../builds/SafariExtension.zip *
- name: Upload SafariExtension to release
uses: Shopify/[email protected]
with:
name: SafariExtension.zip
path: ./builds/SafariExtension.zip
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Create Edge artifacts
- name: Clear dist for Edge
run: rm -rf ./dist
- name: Create Edge artifacts
run: npm run build:edge
- name: Zip Artifacts
run: cd ./dist ; zip -r ../builds/EdgeExtension.zip *
- name: Upload EdgeExtension to release
uses: Shopify/[email protected]
with:
name: Edge插件.zip
path: ./builds/EdgeExtension.zip
repo-token: ${{ secrets.GITHUB_TOKEN }}