release(prep): loadout-os v1.0.0 — README translations (8 langs) + re… #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| tags: ['v*'] | |
| permissions: | |
| contents: write # for GitHub Release creation | |
| id-token: write # for npm provenance via Sigstore OIDC | |
| jobs: | |
| release: | |
| name: Publish to npm + GitHub Release | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version: '22' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install npm >=11.5 in sandbox for OIDC trusted-publishing auth | |
| run: | | |
| # Node 22's bundled npm 10.9 races on an in-place 'npm i -g npm@latest' | |
| # (MODULE_NOT_FOUND: promise-retry). Install npm@latest into a sandbox | |
| # dir and shadow the system npm via PATH instead. | |
| SANDBOX="$HOME/.npm-cli-sandbox" | |
| mkdir -p "$SANDBOX" | |
| pushd "$SANDBOX" >/dev/null | |
| echo '{"name":"npm-cli-sandbox","version":"0.0.0","private":true}' > package.json | |
| npm install --no-save --no-audit --no-fund --silent npm@latest | |
| popd >/dev/null | |
| echo "$SANDBOX/node_modules/.bin" >> "$GITHUB_PATH" | |
| "$SANDBOX/node_modules/.bin/npm" --version | |
| - name: Verify tag matches packages/cli/package.json version | |
| run: | | |
| PKG_VERSION=$(node -p "require('./packages/cli/package.json').version") | |
| TAG_VERSION="${GITHUB_REF_NAME#v}" | |
| echo "Tag: ${GITHUB_REF_NAME} -> ${TAG_VERSION}" | |
| echo "Package (packages/cli): ${PKG_VERSION}" | |
| if [ "${PKG_VERSION}" != "${TAG_VERSION}" ]; then | |
| echo "::error::Tag ${TAG_VERSION} does not match packages/cli/package.json version ${PKG_VERSION}" | |
| exit 1 | |
| fi | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build (kernel -> memories -> rules -> cli) | |
| run: npm run build | |
| - name: Bundle the CLI (self-contained publish artifact) | |
| run: npm run bundle -w packages/cli | |
| - name: Test | |
| run: npm test | |
| - name: npm pack dry-run (verify shape) | |
| run: npm pack --dry-run -w packages/cli | |
| # The published package is SELF-CONTAINED: packages/cli prepublishOnly runs | |
| # build + esbuild bundle, inlining the kernel + memories + rules logic into | |
| # dist/loadout-os.js — no external @mcptoolshop runtime deps (we also bundle | |
| # explicitly above so the pack-dry-run shape check sees the real artifact). | |
| - name: Publish to npm with provenance (OIDC trusted publisher) | |
| run: npm publish -w packages/cli --provenance --access public | |
| - name: Create GitHub Release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release create "${GITHUB_REF_NAME}" \ | |
| --title "loadout-os ${GITHUB_REF_NAME}" \ | |
| --generate-notes \ | |
| --verify-tag |