-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (53 loc) · 1.9 KB
/
gem-devtools-publish.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
name: Publish Gem Devtools
on:
push:
tags:
- gem-devtools@*
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
gem-devtools-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4 # docs https://pnpm.io/continuous-integration#github-actions
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: pnpm
- run: pnpm install
- name: Build
run: |
export VERSION=$(node -e "console.log(require('./package.json').version)")
export ZIP_NAME=gem_devtools-${VERSION}.zip
export ZIP_PATH=packages/gem-devtools/build/${ZIP_NAME}
echo ${ZIP_PATH}
pnpm update:version
pnpm build:zip
echo "ZIP_PATH=${ZIP_PATH}" >> $GITHUB_ENV
working-directory: packages/gem-devtools
- name: Upload to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: packages/gem-devtools/build/*
file_glob: true
tag: ${{ github.ref }}
overwrite: true
# https://github.com/trmcnvn/firefox-addon
# - uses: trmcnvn/firefox-addon@v1
# with:
# uuid: "{2af13fd2-a726-41de-b3a1-4bf2cb91c105}"
# xpi: ${{ env.ZIP_PATH }}
# manifest: packages/gem-devtools/extension/manifest.json
# api-key: ${{ secrets.FIREFOX_API_KEY }}
# api-secret: ${{ secrets.FIREFOX_API_SECRET }}
- uses: trmcnvn/chrome-addon@v2
with:
extension: lgfpciakeemopebkmjajengljoakjfle
zip: ${{ env.ZIP_PATH }}
client-id: ${{ secrets.CHROME_CLIENT_ID }}
client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}