-
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
Conversation
| node-version: lts/* | ||
| cache: npm | ||
| - run: npm ci | ||
| - uses: ipfs/aegir/actions/cache-node-modules@main |
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.
Thanks to this, we'll retrieve the build from cache. If, for some reason, cached build is not available, we'll run npm run build.
| 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' |
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
| "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", |
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 removed build from here because we want to retrieve it from cache instead of running it during publishing.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9 +/- ##
=========================
=========================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This PR ensures that we use the cached build for the publishing if available. The build should be cached when
js-test-and-releaseruns.This PR also introduces usage of the new
release(https://github.com/ipdxco/unified-github-workflows/releases/tag/v1.0.30) output of thejs-test-and-releasejob. The output indicates whether a release was attempted or not.