chore: version package #15
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: | |
| workflow_dispatch: | |
| pull_request: | |
| types: | |
| - closed | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }} | |
| cancel-in-progress: false | |
| jobs: | |
| release: | |
| if: > | |
| github.repository == 'triggerdotdev/agentcrumbs' && | |
| ( | |
| github.event_name == 'workflow_dispatch' || | |
| ( | |
| github.event.pull_request.merged == true && | |
| github.event.pull_request.head.ref == 'changeset-release/main' | |
| ) | |
| ) | |
| name: Publish to npm | |
| runs-on: ubuntu-latest | |
| environment: npm-publish | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| registry-url: https://registry.npmjs.org | |
| # npm 11.5.1+ required for OIDC publishing | |
| - run: npm install -g npm@11.6.4 | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm build | |
| - run: pnpm typecheck | |
| - name: Publish to npm | |
| run: pnpm changeset publish | |
| env: | |
| NPM_CONFIG_PROVENANCE: true | |
| - name: Create git tags | |
| run: | | |
| VERSION=$(node -p "require('./packages/agentcrumbs/package.json').version") | |
| git tag "v${VERSION}" | |
| git push origin "v${VERSION}" |