-
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (69 loc) · 2.32 KB
/
release.yml
File metadata and controls
82 lines (69 loc) · 2.32 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: "Submit to Web Store"
permissions:
contents: write
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
jobs:
build-and-release:
name: Build and Release
runs-on: macos-latest
env:
FIREFOX_EXTENSION_ID: ${{ secrets.FIREFOX_EXTENSION_ID }}
FIREFOX_JWT_ISSUER: ${{ secrets.FIREFOX_JWT_ISSUER }}
FIREFOX_JWT_SECRET: ${{ secrets.FIREFOX_JWT_SECRET }}
CHROME_EXTENSION_ID: ${{ secrets.CHROME_EXTENSION_ID }}
CHROME_CLIENT_ID: ${{ secrets.CHROME_CLIENT_ID }}
CHROME_CLIENT_SECRET: ${{ secrets.CHROME_CLIENT_SECRET }}
CHROME_REFRESH_TOKEN: ${{ secrets.CHROME_REFRESH_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Ensure Yarn cache directory exists
run: mkdir -p ~/Library/Caches/Yarn/v6
- name: Setup Node.js with Yarn cache
uses: actions/setup-node@v6
with:
node-version: 22.x
cache: "yarn"
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build the extension
run: |
yarn zip
yarn zip:firefox --mv3
yarn zip -b edge
yarn zip -b opera
- name: Verify build outputs
run: ls -l .output/*.zip
- name: Update CHANGELOG
id: changelog
uses: requarks/changelog-action@v1
continue-on-error: true
with:
token: ${{ github.token }}
tag: ${{ github.ref_name }}
- name: Commit CHANGELOG.md
if: steps.changelog.outcome == 'success'
uses: stefanzweifel/git-auto-commit-action@v7
with:
branch: main
commit_message: "docs: update CHANGELOG.md for ${{ github.ref_name }} [skip ci]"
file_pattern: CHANGELOG.md
- name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
name: "v.${{ github.ref_name }}"
draft: true
generate_release_notes: true
body_path: INSTALL.md
files: .output/*.zip
- name: Submit to stores
if: startsWith(github.ref, 'refs/tags/')
run: |
yarn wxt submit \
--chrome-zip .output/*-chrome.zip \
--firefox-zip .output/*-firefox.zip \
--firefox-sources-zip .output/*-sources.zip