-
Notifications
You must be signed in to change notification settings - Fork 0
116 lines (96 loc) · 3.55 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
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
name: Create release
on:
push:
tags:
- "v*.*.*"
jobs:
release:
# prevents this action from running on forks
if: github.repository == 'runarmod/Karaktersnitt'
name: Create new GitHub release
runs-on: ubuntu-latest
steps:
- name: 🔄 Checkout
uses: actions/checkout@v4
- name: 🟢 Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "latest"
- name: ⚙️ Install web-ext
run: npm install -g web-ext
- name: 🏗️ Build the extension
run: |
web-ext build
cp web-ext-artifacts/*.zip latest.zip
- name: 📦 Upload artifact
uses: actions/upload-artifact@v4
with:
name: web-ext-artifacts
path: latest.zip
- name: 🚀 Release
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.TOKEN }}
generate_release_notes: true
make_latest: true
files: web-ext-artifacts/*.zip
publish-firefox:
# prevents this action from running on forks
if: github.repository == 'runarmod/Karaktersnitt'
name: Update listing on Firefox
runs-on: ubuntu-latest
needs: release
steps:
- name: 🔄 Checkout
uses: actions/checkout@v4
- name: 🟢 Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "latest"
- name: ⚙️ Install web-ext
run: npm install -g web-ext
- name: 🚀 Sign and publish to Firefox
run: web-ext sign --api-key=${{ secrets.FIREFOX_API_KEY }} --api-secret=${{ secrets.FIREFOX_API_SECRET }} --channel=listed --approval-timeout=0 --timeout=600000
publish-chrome:
# prevents this action from running on forks
if: github.repository == 'runarmod/Karaktersnitt'
name: Update listing on Chrome
runs-on: ubuntu-latest
needs: release
steps:
- name: 🔄 Checkout
uses: actions/checkout@v4
- name: 🟢 Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "latest"
- name: 📥 Download artifact
uses: actions/download-artifact@v4
- name: 🚀 Publish to Chrome
run: |
npm install -g chrome-webstore-upload-cli
npx chrome-webstore-upload-cli --source=web-ext-artifacts/latest.zip
env:
EXTENSION_ID: ${{ secrets.CHROME_EXTENSION_ID }}
CLIENT_ID: ${{ secrets.CHROME_CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CHROME_CLIENT_SECRET }}
REFRESH_TOKEN: ${{ secrets.CHROME_REFRESH_TOKEN }}
publish-edge:
# prevents this action from running on forks
if: github.repository == 'runarmod/Karaktersnitt'
name: Update listing on Edge
runs-on: ubuntu-latest
needs: release
steps:
- name: 🔄 Checkout
uses: actions/checkout@v4
- name: 🟢 Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "latest"
- name: 📥 Download artifact
uses: actions/download-artifact@v4
- name: ⚙️ Install edge-addons-upload-cli
run: npm install -g edge-addons-upload-cli
- name: 🚀 Publish to Edge
run: npx edge-addons-upload-cli upload --autoPublish --source web-ext-artifacts/latest.zip --product-id ${{ secrets.EDGE_PRODUCT_ID }} --client-id ${{ secrets.EDGE_CLIENT_ID }} --client-secret ${{ secrets.EDGE_CLIENT_SECRET }} --access-token-url ${{ secrets.EDGE_ACCESS_TOKEN_URL }}