Skip to content

Commit d5b8dc4

Browse files
authored
Merge pull request #9 from ipshipyard/publish-update
ci: use cached build for publishing
2 parents 22576c4 + b639096 commit d5b8dc4

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,19 @@ jobs:
3131
publish-extension:
3232
runs-on: ubuntu-latest
3333
needs: js-test-and-release
34-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
34+
if: needs.js-test-and-release.outputs.release == 'true'
3535
steps:
3636
- uses: actions/checkout@v4
37+
with:
38+
persist-credentials: false
3739
- uses: actions/setup-node@v4
3840
with:
3941
node-version: lts/*
40-
cache: npm
41-
- run: npm ci
42+
- uses: ipfs/aegir/actions/cache-node-modules@main
4243
- run: npm run package
4344
- run: npm run publish:chrome-store
4445
env:
4546
CHROME_CLIENT_ID: ${{ secrets.CHROME_CLIENT_ID }}
4647
CHROME_CLIENT_SECRET: ${{ secrets.CHROME_CLIENT_SECRET }}
4748
CHROME_REFRESH_TOKEN: ${{ secrets.CHROME_REFRESH_TOKEN }}
48-
CHROME_EXTENSION_ID: ${{ vars.CHROME_EXTENSION_ID }}
49+
CHROME_EXTENSION_ID: ${{ vars.CHROME_EXTENSION_ID }}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"scripts": {
1616
"sync-version": "node scripts/sync-version.mjs",
1717
"build": "npm run sync-version && tsc && cp src/manifest.json dist/ && cp src/popup.html dist/ && cp -r src/icons dist/",
18-
"package": "npm run build && web-ext build --source-dir=dist --artifacts-dir=. --filename=ipfs-quicklaunch.zip --overwrite-dest",
19-
"publish:chrome-store": "npx cws-publish $CHROME_CLIENT_ID $CHROME_CLIENT_SECRET $CHROME_REFRESH_TOKEN ipfs-quicklaunch.zip $CHROME_EXTENSION_ID",
18+
"package": "web-ext build --source-dir=dist --artifacts-dir=. --filename=ipfs-quicklaunch.zip --overwrite-dest",
19+
"publish:chrome-store": "npx cws-publish \"$CHROME_CLIENT_ID\" \"$CHROME_CLIENT_SECRET\" \"$CHROME_REFRESH_TOKEN\" ipfs-quicklaunch.zip \"$CHROME_EXTENSION_ID\"",
2020
"release": "aegir release",
2121
"start": "npm run build && web-ext run --source-dir=dist --target=chromium",
2222
"watch": "tsc --watch",

0 commit comments

Comments
 (0)