2.8.3 #22
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: Release extension | |
env: | |
EXTENSION_ID: 'befpdcighpikpkklmfonkmdafmfnnkfn' # Chrome | |
WEB_EXT_ID: '{3b5da596-9072-4e68-bce5-adb82ac9063a}' # Firefox | |
on: | |
release: | |
types: | |
- published # Run when a GH release is published | |
jobs: | |
build: | |
name: Build extension | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install packages | |
run: npm install | |
- name: Run build | |
run: npm run build | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build | |
path: build | |
- name: Upload dist artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: dist | |
publish_to_chrome: | |
name: Publish to Chrome Web Store | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install packages | |
run: npm install | |
- name: Download build artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: build | |
path: build | |
- name: Publish | |
run: npm run release:cws # https://github.com/fregante/chrome-webstore-upload | |
env: | |
CLIENT_ID: ${{ secrets.CLIENT_ID }} | |
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} | |
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }} | |
publish_to_firefox: | |
name: Publish to Firefox Add-ons | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install packages | |
run: npm install | |
- name: Download build artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: build | |
path: build | |
- name: Publish | |
run: npm run release:amo # https://github.com/fregante/web-ext-submit | |
env: | |
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }} | |
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }} | |
publish_to_github: | |
name: Publish to GitHub | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download dist artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
path: dist | |
- name: Add artifact to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: dist/* | |
tag: ${{ github.ref }} | |
file_glob: true |