diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0f96dc4..ac1a677 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -38,15 +38,32 @@ 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 }} @@ -54,11 +71,4 @@ jobs: - 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