v1.12.0 #30
Workflow file for this run
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 | |
on: | |
release: | |
types: | |
- published | |
env: | |
package-filename: accessibility_checker_for_github_markdown-${{github.ref_name}}.zip | |
jobs: | |
build: | |
name: Build and upload extension package | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
- run: npm ci | |
- name: Update version in manifest.json | |
run: npx dot-json@1 manifest.json version "${{github.ref_name}}" | |
- name: Build package | |
run: npm run package | |
- name: Upload to release | |
run: gh release upload ${{ github.event.release.tag_name }} ./web-ext-artifacts/${{env.package-filename}} --clobber | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload to artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: extension-package | |
path: ./web-ext-artifacts/${{env.package-filename}} | |
publish-chrome: | |
name: Publish to Chrome Web Store | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: extension-package | |
path: web-ext-artifacts | |
- run: npx chrome-webstore-upload-cli@2 upload --auto-publish --source ./web-ext-artifacts/${{env.package-filename}} | |
env: | |
EXTENSION_ID: ${{ secrets.CHROME_EXTENSION_ID }} | |
CLIENT_ID: ${{ secrets.CHROME_STORE_CLIENT_ID }} | |
CLIENT_SECRET: ${{ secrets.CHROME_STORE_CLIENT_SECRET }} | |
REFRESH_TOKEN: ${{ secrets.CHROME_STORE_CLIENT_REFRESH_TOKEN }} | |
publish-firefox: | |
name: Publish to AMO (Mozilla Add-ons) | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
# Unfortunately web-ext is unable to just sign and publish the existing artifact - we have to rebuild it | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
- run: npm ci | |
- name: Update version in manifest.json | |
run: npx dot-json@1 manifest.json version "${{github.ref_name}}" | |
- run: npm run build | |
- run: npx web-ext@7 sign --use-submission-api --channel listed --ignore-files .* node_modules web-ext-artifacts src "assets/!(icon*)" @types *config* package* | |
env: | |
WEB_EXT_API_KEY: ${{ secrets.AMO_API_KEY }} | |
WEB_EXT_API_SECRET: ${{ secrets.AMO_API_SECRET }} |