Repository navigation
Release package 0.3.0 #27
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
7f56958
e8798ce
e6c467b
1371270
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 |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ name: Release | |
| on: | ||
| push: | ||
| tags: | ||
| - 'v*' | ||
| - "v*" | ||
|
|
||
| jobs: | ||
| release-plan: | ||
|
|
@@ -15,17 +15,29 @@ jobs: | |
| - uses: actions/checkout@v4 | ||
| - id: check | ||
| shell: bash | ||
| env: | ||
| PUBLISH_NPM: ${{ vars.PUBLISH_NPM }} | ||
| run: | | ||
| tag="${GITHUB_REF_NAME#v}" | ||
| pkg="$(node -p "require('./package.json').version")" | ||
| if [ "$tag" = "$pkg" ]; then | ||
| if [ "$tag" = "$pkg" ] && [ "$PUBLISH_NPM" = "true" ]; then | ||
| echo "publish_npm=true" >> "$GITHUB_OUTPUT" | ||
| echo "Tag v$tag matches package.json. Publishing the headless package." | ||
| echo "Tag v$tag matches package.json and PUBLISH_NPM=true. Publishing the headless package." | ||
| else | ||
| echo "publish_npm=false" >> "$GITHUB_OUTPUT" | ||
| echo "Tag v$tag does not match package.json $pkg. Skipping the headless npm publish and binary build." | ||
| echo "Skipping npm publish and the binary build. Set the PUBLISH_NPM repository variable to true when the package is ready." | ||
| fi | ||
|
|
||
| github-release: | ||
| name: GitHub Release | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - uses: softprops/action-gh-release@v2 | ||
| with: | ||
| generate_release_notes: true | ||
|
|
||
| build-daemon: | ||
| name: Build Daemon Bundles | ||
| needs: release-plan | ||
|
|
@@ -130,7 +142,7 @@ jobs: | |
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
| registry-url: 'https://registry.npmjs.org' | ||
| registry-url: "https://registry.npmjs.org" | ||
| # Trusted publishing requires npm >= 11.5.1; node 22 ships an older npm. | ||
| - run: npm install -g npm@latest | ||
| - run: cd daemon && pnpm install && pnpm run bundle && pnpm run bundle:sandbox-client | ||
|
|
@@ -141,7 +153,13 @@ jobs: | |
| cp scripts/sync-version.js dist/scripts/ 2>/dev/null || true | ||
| cp daemon/dist/daemon.bundle.mjs dist/daemon/dist/ | ||
| cp daemon/dist/sandbox-client.js dist/daemon/dist/ | ||
| cp package.json dist/ | ||
| node --input-type=module -e ' | ||
| import { readFileSync, writeFileSync } from "node:fs"; | ||
| const pkg = JSON.parse(readFileSync("package.json", "utf8")); | ||
| delete pkg.private; | ||
| delete pkg.workspaces; | ||
| writeFileSync("dist/package.json", JSON.stringify(pkg, null, 2) + "\n"); | ||
|
Comment on lines
+158
to
+161
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.
When the AGENTS.md reference: AGENTS.md:L13-L17 Useful? React with 👍 / 👎. |
||
| ' | ||
| cp README.md dist/ | ||
| cp LICENSE dist/ 2>/dev/null || true | ||
| # No NODE_AUTH_TOKEN: auth comes from the OIDC trusted publisher config. | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| [package] | ||
| name = "dev-browser" | ||
| version = "0.2.9" | ||
| version = "0.3.0" | ||
| edition = "2021" | ||
|
|
||
| [dependencies] | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
When an operator follows the upstream release procedure in
RELEASING.md:78-104, they are told to push a matching version tag and then verify the npm release, but this new condition now successfully skips every build and publish unless a separate repository variable is exactlytrue. The first-time setup inRELEASING.md:14-28never mentions configuring or resettingPUBLISH_NPM, so the documented procedure can finish green with only a GitHub release whiledev-browserremains unpublished; update the release instructions to include this required gate and its lifecycle.Useful? React with 👍 / 👎.