generated from aeksco/react-typescript-web-extension-starter
-
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (66 loc) · 1.96 KB
/
main.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
name: Build and Publish
on:
push:
branches: [ main ]
workflow_dispatch:
env:
MAJOR_VER: 1
MINOR_VER: 1
jobs:
build_firefox:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '21.6.2'
- run: npm install --legacy-peer-deps
- run: npm run build -- --env=version=$MAJOR_VER.$MINOR_VER.${{ github.run_number }}
- name: Zip firefox
run: zip -qq -r firefox.zip *
working-directory: dist
- uses: actions/upload-artifact@v4
with:
name: firefox
path: dist/firefox.zip
publish_firefox:
needs: [build_firefox]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Zip source
run: zip -qq -r src.zip *
- name: Download extension
uses: actions/download-artifact@v4
with:
name: firefox
- name: Publish Firefox
uses: maoserr/[email protected]
with:
firefox_extension_id: [email protected]
api_key: ${{ secrets.FIREFOX_API_KEY }}
api_secret: ${{ secrets.FIREFOX_API_SECRET }}
file: firefox.zip
src_file: src.zip
- name: Push notification
uses: shink/bark-action@v2
with:
key: ${{ secrets.BARK_KEY }} # Your secret key, it is required
title: ✅Extension Publish Success!
body: whistle-firefox
isArchive: 1
publish_release:
needs: [ build_firefox ]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Download extension
uses: actions/download-artifact@v4
- name: Release
uses: opspresso/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
TAG_NAME: whistle-firefox-${{ github.run_number }}
ASSET_PATH: firefox.zip