-
Notifications
You must be signed in to change notification settings - Fork 4
63 lines (52 loc) · 1.75 KB
/
release.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
name: 'Release'
on:
push:
branches: [main]
jobs:
release:
name: 'Release'
runs-on: 'ubuntu-latest'
permissions: 'write-all'
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
release-type: node
- name: Checkout
uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 8
- name: Setup Node
if: ${{ steps.release.outputs.release_created }}
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- name: Install
if: ${{ steps.release.outputs.release_created }}
run: pnpm install
- name: Build project
if: ${{ steps.release.outputs.release_created }}
run: pnpm build
- name: Archive build artifacts
if: ${{ steps.release.outputs.release_created }}
run: |
pushd .output/chrome-mv3/ && zip -r ../../nrk-dual-subs-chrome.zip ./* && popd
- name: Upload release artifact
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ steps.release.outputs.tag_name }} nrk-dual-subs-chrome.zip
- name: Publish Extension
uses: Klemensas/chrome-extension-upload-action@master
with:
refresh-token: ${{ secrets.CHROME_STORE_REFRESH_TOKEN }}
client-id: ${{ secrets.CHROME_STORE_CLIENT_ID }}
client-secret: ${{ secrets.CHROME_STORE_CLIENT_SECRET }}
app-id: ${{ secrets.CHROME_STORE_APP_ID }}
file-name: './nrk-dual-subs-chrome.zip'
publish: true