-
Notifications
You must be signed in to change notification settings - Fork 878
Use Chrome API v2 for release publishing #1091
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,7 +23,6 @@ on: | |
| - "v*" | ||
|
|
||
| permissions: | ||
| id-token: "write" | ||
| contents: "write" | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
|
|
@@ -94,6 +93,15 @@ jobs: | |
|
|
||
| - run: npm run release:firefox-sources | ||
|
|
||
| - name: Upload Chrome package artifact | ||
| if: github.event_name == 'push' || inputs.submit_stores == 'true' | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | ||
| with: | ||
| name: chrome-extension | ||
| path: build/chromium.zip | ||
| if-no-files-found: error | ||
| retention-days: 30 | ||
|
|
||
| - if: github.event_name == 'push' | ||
| run: | | ||
| gh release upload ${{github.ref_name}} build/chromium.zip | ||
|
|
@@ -115,13 +123,7 @@ jobs: | |
| fi | ||
| npm run release:submit -- "${args[@]}" | ||
| env: | ||
| CHROME_EXTENSION_ID: ${{ secrets.CHROME_EXTENSION_ID }} | ||
| CHROME_CLIENT_ID: ${{ secrets.CHROME_CLIENT_ID }} | ||
| CHROME_CLIENT_SECRET: ${{ secrets.CHROME_CLIENT_SECRET }} | ||
| CHROME_REFRESH_TOKEN: ${{ secrets.CHROME_REFRESH_TOKEN }} | ||
| CHROME_PUBLISH_TARGET: ${{ secrets.CHROME_PUBLISH_TARGET }} | ||
| CHROME_DEPLOY_PERCENTAGE: ${{ secrets.CHROME_DEPLOY_PERCENTAGE }} | ||
| CHROME_REVIEW_EXEMPTION: ${{ secrets.CHROME_REVIEW_EXEMPTION }} | ||
| CHROME_PUBLISH_VIA_ACTION: "true" | ||
| FIREFOX_EXTENSION_ID: ${{ secrets.FIREFOX_EXTENSION_ID }} | ||
| FIREFOX_JWT_ISSUER: ${{ secrets.FIREFOX_JWT_ISSUER }} | ||
| FIREFOX_JWT_SECRET: ${{ secrets.FIREFOX_JWT_SECRET }} | ||
|
|
@@ -134,3 +136,38 @@ jobs: | |
| - if: github.event_name == 'push' | ||
| run: | | ||
| gh release edit ${{github.ref_name}} --draft=false | ||
|
|
||
| publish_chrome: | ||
| if: github.event_name == 'push' || inputs.submit_stores == 'true' | ||
| needs: build_and_release | ||
| runs-on: ubuntu-latest | ||
| environment: chrome-web-store | ||
| permissions: | ||
| id-token: "write" | ||
| concurrency: | ||
| group: chrome-web-store | ||
| cancel-in-progress: false | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| queue: max | ||
|
Comment on lines
+147
to
+150
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1. Release workflows fail validation before chrome publishing The Chrome job adds queue: max under the GitHub Actions concurrency configuration, but that configuration does not accept a queue key. Every tagged release workflow containing this job can be rejected during workflow parsing, so neither the release build nor the Chrome submission starts. Agent Prompt
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| steps: | ||
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | ||
| with: | ||
| name: chrome-extension | ||
| - id: auth | ||
| uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 | ||
| with: | ||
| workload_identity_provider: ${{ vars.CWS_WIF_PROVIDER }} | ||
| service_account: ${{ vars.CWS_SERVICE_ACCOUNT }} | ||
| token_format: access_token | ||
| access_token_scopes: https://www.googleapis.com/auth/chromewebstore | ||
| access_token_lifetime: 1800s | ||
| create_credentials_file: false | ||
| export_environment_variables: false | ||
| - uses: hamzahamidi/publish-to-chrome-web-store@c8919147f8de0d6f1129bec36345e4a9aa638af9 # v1 | ||
| with: | ||
| access-token: ${{ steps.auth.outputs.access_token }} | ||
| publisher-id: ${{ vars.CWS_PUBLISHER_ID }} | ||
| item-id: ${{ secrets.CHROME_EXTENSION_ID }} | ||
| zip: chromium.zip | ||
| deploy-percentage: ${{ secrets.CHROME_DEPLOY_PERCENTAGE }} | ||
| skip-review: ${{ secrets.CHROME_REVIEW_EXEMPTION }} | ||
| dry-run: ${{ github.event_name == 'workflow_dispatch' && inputs.dry_run == 'true' }} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift
Do not make Chrome publishing depend on other store submissions.
If the Firefox or Edge command fails after the Chrome artifact upload,
build_and_releasefails and GitHub skipspublish_chrome. A valid Chrome package is then never submitted. Make Chrome depend on the successful build and artifact upload, rather than on the combined store-submission result. (docs.github.com)🤖 Prompt for AI Agents