-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds a new ci.yml workflow to build and upload bundle stats to Codecov. Renames old ci.yml to publish.yml.
- Loading branch information
1 parent
76cc43e
commit bcb59cb
Showing
5 changed files
with
772 additions
and
92 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,42 +1,18 @@ | ||
name: ci | ||
on: | ||
release: | ||
types: [published] | ||
|
||
permissions: | ||
id-token: write | ||
|
||
on: push | ||
|
||
jobs: | ||
publish: | ||
ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
node-version: "22" | ||
- run: npm ci | ||
- name: Build extension | ||
run: npm run build | ||
env: | ||
SENTRY_DSN: ${{ vars.SENTRY_DSN }} | ||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | ||
- run: | | ||
jq --arg version "$VERSION" '.version=$version' dist/manifest.json > manifest.tmp.json \ | ||
&& mv manifest.tmp.json dist/manifest.json | ||
jq --arg version "$VERSION" '.version=$version' dist/manifest.firefox.json > manifest.tmp.json \ | ||
&& mv manifest.tmp.json dist/manifest.firefox.json | ||
env: | ||
VERSION: ${{ github.event.release.tag_name }} | ||
- run: | | ||
cp -r dist dist-firefox | ||
cp dist-firefox/manifest.firefox.json dist-firefox/manifest.json | ||
- name: Publish to Chrome | ||
working-directory: dist | ||
run: npx chrome-webstore-upload-cli@2 upload --auto-publish | ||
env: | ||
EXTENSION_ID: "gedikamndpbemklijjkncpnolildpbgo" | ||
CLIENT_ID: ${{ secrets.GOOGLE_WEB_STORE_CLIENT_ID }} | ||
CLIENT_SECRET: ${{ secrets.GOOGLE_WEB_STORE_CLIENT_SECRET }} | ||
REFRESH_TOKEN: ${{ secrets.GOOGLE_WEB_STORE_REFRESH_TOKEN }} | ||
- name: Publish to Firefox | ||
working-directory: dist-firefox | ||
run: npx web-ext-submit@7 | ||
env: | ||
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_JWT_ISSUER }} | ||
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_JWT_SECRET }} |
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: publish | ||
|
||
permissions: | ||
id-token: write | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: "22" | ||
- run: npm ci | ||
- name: Build extension | ||
run: npm run build | ||
env: | ||
SENTRY_DSN: ${{ vars.SENTRY_DSN }} | ||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | ||
- run: | | ||
jq --arg version "$VERSION" '.version=$version' dist/manifest.json > manifest.tmp.json \ | ||
&& mv manifest.tmp.json dist/manifest.json | ||
jq --arg version "$VERSION" '.version=$version' dist/manifest.firefox.json > manifest.tmp.json \ | ||
&& mv manifest.tmp.json dist/manifest.firefox.json | ||
env: | ||
VERSION: ${{ github.event.release.tag_name }} | ||
- run: | | ||
cp -r dist dist-firefox | ||
cp dist-firefox/manifest.firefox.json dist-firefox/manifest.json | ||
- name: Publish to Chrome | ||
working-directory: dist | ||
run: npx chrome-webstore-upload-cli@2 upload --auto-publish | ||
env: | ||
EXTENSION_ID: "gedikamndpbemklijjkncpnolildpbgo" | ||
CLIENT_ID: ${{ secrets.GOOGLE_WEB_STORE_CLIENT_ID }} | ||
CLIENT_SECRET: ${{ secrets.GOOGLE_WEB_STORE_CLIENT_SECRET }} | ||
REFRESH_TOKEN: ${{ secrets.GOOGLE_WEB_STORE_REFRESH_TOKEN }} | ||
- name: Publish to Firefox | ||
working-directory: dist-firefox | ||
run: npx web-ext-submit@7 | ||
env: | ||
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_JWT_ISSUER }} | ||
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_JWT_SECRET }} |
Oops, something went wrong.