-
Notifications
You must be signed in to change notification settings - Fork 0
ci: use cached build for publishing #9
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
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 |
|---|---|---|
|
|
@@ -31,18 +31,19 @@ jobs: | |
| publish-extension: | ||
| runs-on: ubuntu-latest | ||
| needs: js-test-and-release | ||
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
| if: needs.js-test-and-release.outputs.release == 'true' | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: lts/* | ||
| cache: npm | ||
| - run: npm ci | ||
| - uses: ipfs/aegir/actions/cache-node-modules@main | ||
|
Contributor
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. Thanks to this, we'll retrieve the build from cache. If, for some reason, cached build is not available, we'll run |
||
| - run: npm run package | ||
| - run: npm run publish:chrome-store | ||
| env: | ||
| CHROME_CLIENT_ID: ${{ secrets.CHROME_CLIENT_ID }} | ||
| CHROME_CLIENT_SECRET: ${{ secrets.CHROME_CLIENT_SECRET }} | ||
| CHROME_REFRESH_TOKEN: ${{ secrets.CHROME_REFRESH_TOKEN }} | ||
| CHROME_EXTENSION_ID: ${{ vars.CHROME_EXTENSION_ID }} | ||
| CHROME_EXTENSION_ID: ${{ vars.CHROME_EXTENSION_ID }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,8 +15,8 @@ | |
| "scripts": { | ||
| "sync-version": "node scripts/sync-version.mjs", | ||
| "build": "npm run sync-version && tsc && cp src/manifest.json dist/ && cp src/popup.html dist/ && cp -r src/icons dist/", | ||
| "package": "npm run build && web-ext build --source-dir=dist --artifacts-dir=. --filename=ipfs-quicklaunch.zip --overwrite-dest", | ||
| "publish:chrome-store": "npx cws-publish $CHROME_CLIENT_ID $CHROME_CLIENT_SECRET $CHROME_REFRESH_TOKEN ipfs-quicklaunch.zip $CHROME_EXTENSION_ID", | ||
| "package": "web-ext build --source-dir=dist --artifacts-dir=. --filename=ipfs-quicklaunch.zip --overwrite-dest", | ||
|
Contributor
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. I removed build from here because we want to retrieve it from cache instead of running it during publishing. |
||
| "publish:chrome-store": "npx cws-publish \"$CHROME_CLIENT_ID\" \"$CHROME_CLIENT_SECRET\" \"$CHROME_REFRESH_TOKEN\" ipfs-quicklaunch.zip \"$CHROME_EXTENSION_ID\"", | ||
| "release": "aegir release", | ||
| "start": "npm run build && web-ext run --source-dir=dist --target=chromium", | ||
| "watch": "tsc --watch", | ||
|
|
||
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.
I exposed this output in https://github.com/ipdxco/unified-github-workflows/releases/tag/v1.0.30