Publish Gem Devtools #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18.x | |
- run: yarn | |
- 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} | |
export ZIP_NAME_FIREFOX=gem_devtools-firefox-${VERSION}.zip | |
export ZIP_PATH_FIREFOX=packages/gem-devtools/build/${ZIP_NAME_FIREFOX} | |
echo ${ZIP_PATH_FIREFOX} | |
yarn update:version | |
yarn build:zip:firefox | |
# mv build/${ZIP_NAME} build/${ZIP_NAME_FIREFOX} | |
yarn build:zip | |
echo "ZIP_PATH=${ZIP_PATH}" >> $GITHUB_ENV | |
echo "ZIP_PATH_FIREFOX=${ZIP_PATH_FIREFOX}" >> $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: "" | |
# xpi: ${{ env.ZIP_PATH_FIREFOX }} | |
# 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 }} |