From e96c3550339372ac93440c63e0691f46828ea9a3 Mon Sep 17 00:00:00 2001 From: Shiv Rossi Date: Tue, 29 Sep 2026 13:26:16 -0600 Subject: [PATCH] fix(ci): run bootstrap guard after checkout The guard read package.json before actions/checkout, so the file never existed and the job failed before touching the token. Move the guard after checkout. --- .github/workflows/bootstrap-npm.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/bootstrap-npm.yml b/.github/workflows/bootstrap-npm.yml index 42ec576..cc85632 100644 --- a/.github/workflows/bootstrap-npm.yml +++ b/.github/workflows/bootstrap-npm.yml @@ -26,17 +26,17 @@ jobs: runs-on: ubuntu-latest environment: npm-bootstrap steps: + - name: Check out source + uses: actions/checkout@v4 + - name: Guard — package must not already exist on npm run: | - PKG=$(jq -r '.name' "${{ inputs.package_dir }}/package.json") - if npm view "$PKG" version >/dev/null 2>&1; then - echo "::error::$PKG already exists on npm. Use release.yml (OIDC) instead." + PKG_NAME=$(jq -r '.name' "${{ inputs.package_dir }}/package.json") + if npm view "$PKG_NAME" version >/dev/null 2>&1; then + echo "::error::$PKG_NAME already exists on npm. Use release.yml (OIDC) instead." exit 1 fi - echo "bootstrapping $PKG" - - - name: Check out source - uses: actions/checkout@v4 + echo "bootstrapping $PKG_NAME" - name: Set up Node.js uses: actions/setup-node@v4