Skip to content

Publish Gem Devtools #16

Publish Gem Devtools

Publish Gem Devtools #16

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 }}