-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from UTDNebula/publish-action
Publish action
- Loading branch information
Showing
2 changed files
with
30 additions
and
25 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,37 @@ | ||
name: 'Submit to Web Store' | ||
|
||
#Documentation for secrets: https://github.com/PlasmoHQ/bms/blob/main/tokens.md | ||
#There is already an existing google cloud console project that the chrome keys were generated from | ||
#The secrets are linked to my gotyhill@gmail.com email since it is a developer account and has access on both chrome and firefox | ||
|
||
on: | ||
workflow_dispatch: | ||
#This could run on each push to main but it would only work like once a day for chrome | ||
#Chrome won't allow submitting another package when one is in review | ||
|
||
jobs: | ||
build: | ||
main: | ||
name: Build and publish | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Cache pnpm modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.pnpm-store | ||
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}- | ||
- uses: pnpm/action-setup@v2.2.4 | ||
with: | ||
version: latest | ||
run_install: true | ||
- name: Use Node.js 16.x | ||
uses: actions/setup-node@v3.4.1 | ||
- name: Check out Git repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
cache: 'pnpm' | ||
- name: Build and zip extension artifact | ||
run: pnpm package | ||
- name: Browser Platform Publish | ||
node-version: 18 | ||
|
||
- name: Install packages | ||
run: npm ci | ||
|
||
- name: Build and package extension | ||
run: npm run build:chrome && npm run build:firefox | ||
|
||
- name: Publish extension | ||
uses: PlasmoHQ/bpp@v3 | ||
with: | ||
keys: ${{ secrets.SUBMIT_KEYS }} | ||
artifact: build/chrome-mv3-prod.zip | ||
chrome-file: build/chrome-mv3-prod.zip | ||
firefox-file: build/firefox-mv3-prod.zip |
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