Skip to content

chore: version package #15

chore: version package

chore: version package #15

Workflow file for this run

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}"