-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (32 loc) · 1.13 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
name: Chrome Extension CI
on:
push:
branches:
- main
jobs:
build-and-publish:
name: Upload extension
runs-on: ubuntu-latest
# env:
# EXTENSION_ID: ${{ env.EXTENSION_ID }}
steps:
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Checkout repository
uses: actions/checkout@v4
- name: Install webstore cli
run: |-
npm install -g chrome-webstore-upload-cli
- name: Extract manifest version
run: |
MANIFEST_VERSION=$(jq -r '.version' manifest.chrome.json)
echo "MANIFEST_VERSION=$MANIFEST_VERSION" >> $GITHUB_ENV
- name: Upload step
run: |-
chrome-webstore-upload upload -v \
--source dist/package/chrome/boycott-z-${{ env.MANIFEST_VERSION }}.zip \
--extension-id ${{ vars.EXTENSION_ID }} \
--client-id ${{ secrets.CI_GOOGLE_CLIENT_ID }} \
--client-secret ${{ secrets.CI_GOOGLE_CLIENT_SECRET }} \
--refresh-token ${{ secrets.CI_GOOGLE_REFRESH_TOKEN }}