chore: auto-sign extension #101
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: REL | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
jobs: | |
bundle: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: pnpm | |
- run: pnpm install | |
- working-directory: ./workspace/extension | |
run: pnpm build && cd build && zip -r svelte-devtools * | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: extension-${{ github.sha }} | |
path: workspace/extension/build/svelte-devtools.zip | |
# TODO: upload zip to GitHub releases | |
sign: | |
runs-on: ubuntu-latest | |
needs: bundle | |
# TODO: web-ext sign fails if version already exists, find another way to check | |
if: success() && startsWith(github.event.head_commit.message, '~ v') | |
steps: | |
- uses: pnpm/action-setup@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: extension-${{ github.sha }} | |
- run: pnpm dlx web-ext sign --channel unlisted --api-key ${{ secrets.WEB_EXT_API_KEY }} --api-secret ${{ secrets.WEB_EXT_API_SECRET }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: extension-${{ github.sha }} | |
# TODO: upload signed extension to GitHub releases | |
# TODO: publish to Chrome Web Store | |
# publish: | |
# runs-on: ubuntu-latest | |
# needs: bundle | |
# steps: | |
# - uses: actions/download-artifact@v4 | |
# with: | |
# name: extension-${{ github.sha }} |