Skip to content

Commit

Permalink
chore: auto-sign extension (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatiusmb authored Sep 6, 2024
1 parent 140a9b8 commit fb3983d
Showing 1 changed file with 23 additions and 13 deletions.
36 changes: 23 additions & 13 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,37 @@ jobs:
name: extension-${{ github.sha }}
path: workspace/extension/build/svelte-devtools.zip

- if: |
github.repository == 'sveltejs/svelte-devtools' &&
github.event_name == 'push' && github.ref == 'refs/heads/master' &&
startsWith(github.event.head_commit.message, format('~ v{0}', needs.manifest.outputs.version))
publish:
runs-on: ubuntu-latest
needs: [manifest, bundle]

if: |
github.repository == 'sveltejs/svelte-devtools' &&
github.event_name == 'push' && github.ref == 'refs/heads/master' &&
startsWith(github.event.head_commit.message, format('~ v{0}', needs.manifest.outputs.version))
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/download-artifact@v4

- working-directory: 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 }}
- working-directory: extension-${{ github.sha }}
env:
GH_TOKEN: ${{ github.token }}
run: | # https://cli.github.com/manual/gh_release_create
gh release create v${{ needs.manifest.outputs.version }} \
workspace/extension/build/svelte-devtools.zip \
svelte-devtools.zip web-ext-artifacts/*.xpi#svelte-devtools.xpi \
--title ${{ needs.manifest.outputs.version }} \
--draft --generate-notes --notes '
Built from ${{ github.event.head_commit.id }} at https://github.com/sveltejs/svelte-devtools/actions/runs/${{ github.run_id }}
- Chrome Web Store: https://chrome.google.com/webstore/detail/svelte-devtools/kfidecgcdjjfpeckbblhmfkhmlgecoff
- Firefox Signed Add-on: https://github.com/sveltejs/svelte-devtools/releases/download/v${{ needs.manifest.outputs.version }}/svelte-devtools.xpi
---'
# publish:
# runs-on: ubuntu-latest
# needs: bundle

# steps:
# - uses: actions/download-artifact@v3
# with:
# name: extension-${{ github.sha }}
# TODO: publish to Chrome Web Store

0 comments on commit fb3983d

Please sign in to comment.