docs(spec): 0gkit essentials roadmap — 12 SPs across 4 phases (#2) #6
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 | |
| # Coordinated versioning + npm publish for the @foundryprotocol/0gkit-* | |
| # packages, driven by changesets. On a push to main: | |
| # - pending changesets → open/update a "Version Packages" PR | |
| # - versions bumped + NPM_TOKEN set → publish to npm | |
| # Degrades gracefully: with no NPM_TOKEN it only maintains the Version PR. | |
| on: | |
| push: | |
| branches: [main] | |
| concurrency: | |
| group: release-${{ github.ref }} | |
| cancel-in-progress: false | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| id-token: write | |
| jobs: | |
| release: | |
| name: version + publish (changesets) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9.12.0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| registry-url: https://registry.npmjs.org | |
| - run: pnpm install --frozen-lockfile | |
| # Build via turbo so every package's DTS step runs after its workspace | |
| # dependencies have produced dist/*.d.ts. The per-package | |
| # `prepublishOnly` hook has been removed precisely because parallel | |
| # `clean && build` invocations during `changeset publish` race on | |
| # cross-package `.d.ts` reads — the build below is the authoritative | |
| # pre-publish build, and `changeset publish` then just packs the | |
| # current dist for each package. | |
| - run: pnpm build | |
| - id: npmtoken | |
| run: echo "has=${{ secrets.NPM_TOKEN != '' }}" >> "$GITHUB_OUTPUT" | |
| - name: Changesets — version PR and/or publish | |
| uses: changesets/action@v1 | |
| with: | |
| version: pnpm version-packages | |
| publish: ${{ steps.npmtoken.outputs.has == 'true' && 'pnpm release' || '' }} | |
| commit: "chore: version packages" | |
| title: "chore: version packages" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |