Skip to content
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

Release/publish actions: Add Chrome web store automation #2162

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,16 @@ jobs:
}
return version;

# - name: Chrome — Build
# run: npm run build
# - name: Chrome — Upload and Publish
# run: npx chrome-webstore-upload --source=web-ext-artifacts/new_xkit-${{ steps.get-version.outputs.result }}.zip
# env:
# EXTENSION_ID: ${{ secrets.CHROME_EXTENSION_ID }}
# CLIENT_ID: ${{ secrets.CHROME_CLIENT_ID }}
# CLIENT_SECRET: ${{ secrets.CHROME_CLIENT_SECRET }}
# REFRESH_TOKEN: ${{ secrets.CHROME_REFRESH_TOKEN }}
- name: Chrome — Build
run: npm run build
- name: Chrome — Upload
run: npx chrome-webstore-upload upload --source=web-ext-artifacts/new_xkit-${{ steps.get-version.outputs.result }}.zip
continue-on-error: true
env:
EXTENSION_ID: ${{ secrets.CWS_EXTENSION_ID }}
CLIENT_ID: ${{ secrets.CWS_CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CWS_CLIENT_SECRET }}
REFRESH_TOKEN: ${{ secrets.CWS_REFRESH_TOKEN }}

- name: Create Github release draft
uses: softprops/action-gh-release@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,16 @@ jobs:
### NOTE: This workflow may time out here while waiting for Mozilla review.
### If this occurs, run the "Generate Release (after signing)" action once it is complete.

# - name: Chrome — Build
# run: npm run build
# - name: Chrome — Upload and Publish
# run: npx chrome-webstore-upload --source=web-ext-artifacts/new_xkit-${{ steps.get-version.outputs.result }}.zip
# env:
# EXTENSION_ID: ${{ secrets.CHROME_EXTENSION_ID }}
# CLIENT_ID: ${{ secrets.CHROME_CLIENT_ID }}
# CLIENT_SECRET: ${{ secrets.CHROME_CLIENT_SECRET }}
# REFRESH_TOKEN: ${{ secrets.CHROME_REFRESH_TOKEN }}
- name: Chrome — Build
run: npm run build
- name: Chrome — Upload
run: npx chrome-webstore-upload upload --source=web-ext-artifacts/new_xkit-${{ steps.get-version.outputs.result }}.zip
marcustyphoon marked this conversation as resolved.
Show resolved Hide resolved
continue-on-error: true
env:
EXTENSION_ID: ${{ secrets.CWS_EXTENSION_ID }}
CLIENT_ID: ${{ secrets.CWS_CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CWS_CLIENT_SECRET }}
REFRESH_TOKEN: ${{ secrets.CWS_REFRESH_TOKEN }}

- name: Create Github release draft
uses: softprops/action-gh-release@v2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Update Release Metadata
name: Publish Release

on:
workflow_dispatch:
Expand All @@ -9,8 +9,8 @@ on:
required: false

jobs:
create-update-pr:
name: Create update PR
publish-releases:
name: Publish Releases
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -22,10 +22,19 @@ jobs:
node-version: lts/*
cache: npm

- name: Chrome — Publish Release
run: npx chrome-webstore-upload publish
marcustyphoon marked this conversation as resolved.
Show resolved Hide resolved
continue-on-error: true
env:
EXTENSION_ID: ${{ secrets.CWS_EXTENSION_ID }}
CLIENT_ID: ${{ secrets.CWS_CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CWS_CLIENT_SECRET }}
REFRESH_TOKEN: ${{ secrets.CWS_REFRESH_TOKEN }}

- name: Update release metadata
run: node dev/update_release_metadata.mjs ${{ inputs.newVersion || '' }}

- name: Create pull request
- name: Create release pull request
uses: peter-evans/create-pull-request@v7
with:
title: Update release metadata
Expand Down
135 changes: 135 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"sign": "web-ext sign"
},
"devDependencies": {
"chrome-webstore-upload-cli": "^3.3.1",
"dotenv": "^16.4.5",
"eslint": "^7.32.0",
"jsonwebtoken": "^9.0.2",
Expand Down