Skip to content

Commit d6eab18

Browse files
committed
chore: Github release actions
1 parent 7e48aea commit d6eab18

File tree

2 files changed

+51
-2
lines changed

2 files changed

+51
-2
lines changed

.github/workflows/ci.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: "Checkout"
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1616
with:
1717
fetch-depth: 0
1818

1919
- name: "Setup node"
20-
uses: actions/setup-node@v3
20+
uses: actions/setup-node@v4
2121
with:
2222
node-version: "latest"
2323

.github/workflows/publish.yaml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
3+
name: "Publish"
4+
on:
5+
release:
6+
types: [published]
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
steps:
13+
- name: "Checkout"
14+
uses: actions/checkout@v4
15+
16+
- name: "Setup Node"
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: latest
20+
21+
- name: "npm ci"
22+
run: npm ci
23+
24+
- name: "build"
25+
run: npm run build
26+
27+
- name: "web-ext build"
28+
id: web-ext-build
29+
uses: kewisch/action-web-ext@v1
30+
with:
31+
cmd: build
32+
source: src
33+
34+
- name: "web-ext sign"
35+
uses: kewisch/action-web-ext@v1
36+
with:
37+
cmd: sign
38+
source: ${{ steps.web-ext-build.outputs.target }}
39+
channel: listed
40+
apiUrlPrefix: "https://addons.thunderbird.net/api/v4"
41+
apiKey: ${{ secrets.AMO_SIGN_KEY }}
42+
apiSecret: ${{ secrets.AMO_SIGN_SECRET }}
43+
44+
- name: "Attach release assets"
45+
env:
46+
GH_TOKEN: ${{ github.token }}
47+
run: |
48+
gh release upload ${{ github.event.release.tag_name }} \
49+
web-ext-artifacts/*.zip

0 commit comments

Comments
 (0)