claudeship: v0.2.37 #49
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: Publish to npm | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version to publish (leave empty to use package.json version)' | |
| required: false | |
| type: string | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| environment: npm | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Upgrade npm for OIDC support | |
| run: | | |
| npm install -g npm@latest | |
| echo "npm version: $(npm --version)" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Generate Prisma client | |
| run: pnpm --filter @claudeship/server exec prisma generate | |
| - name: Build packages | |
| run: pnpm build | |
| - name: Update version from release tag | |
| if: github.event_name == 'release' | |
| run: | | |
| # Release tag format: claudeship-v0.2.3 | |
| # Extract version from GITHUB_REF (refs/tags/claudeship-v0.2.3) | |
| TAG=${GITHUB_REF#refs/tags/} | |
| # Remove claudeship- prefix, then v prefix | |
| VERSION=${TAG#claudeship-} | |
| VERSION=${VERSION#v} | |
| echo "Updating version to $VERSION" | |
| npm version $VERSION --no-git-tag-version --allow-same-version | |
| - name: Update version from input | |
| if: github.event_name == 'workflow_dispatch' && inputs.version != '' | |
| run: | | |
| echo "Updating version to ${{ inputs.version }}" | |
| npm version ${{ inputs.version }} --no-git-tag-version --allow-same-version | |
| - name: Publish to npm with provenance | |
| run: npm publish --provenance --access public |