-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (52 loc) · 1.77 KB
/
publish.yaml
File metadata and controls
62 lines (52 loc) · 1.77 KB
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
name: Build and publish
on:
release:
types: [ created ]
jobs:
build:
name: Build and publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
- run: git archive --format=zip --output=source.zip HEAD
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Pack
run: npm run pack
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: archives
path: dist/*.zip
- name: Get zip path
run: |
echo "ZIP_CHROME=dist/$(ls dist | grep chrome)" >> $GITHUB_ENV
echo "ZIP_FF=dist/$(ls dist | grep firefox)" >> $GITHUB_ENV
- name: Publish to Firefox Add-ons
uses: browser-actions/release-firefox-addon@v0.2.1
with:
addon-id: "{2ac87779-a246-4986-9f4e-882292ec11af}"
addon-path: ${{ env.ZIP_FF }}
source-path: source.zip
approval-note: |
Requires Node.js to build.
npm run build to build from source, output in build/
npm run pack to zip the build, output in dist/
release-note: "New release!"
license: "MIT"
auth-api-issuer: ${{ secrets.FF_ISSUER }}
auth-api-secret: ${{ secrets.FF_SECRET }}
- name: Publish to Chrome Web Store
uses: mnao305/chrome-extension-upload@v5.0.0
with:
extension-id: "nhjapojbdgmjlnmlenegefgfjannjchb"
publish: true
file-path: ${{ env.ZIP_CHROME }}
client-id: ${{ secrets.CHROME_ID }}
client-secret: ${{ secrets.CHROME_SECRET }}
refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}