Repository navigation
Merge pull request #3 from codelitdev/changeset-release/main #16
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: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| pull-requests: write | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: 24.21.0 | |
| registry-url: https://registry.npmjs.org | |
| # npm trusted publishing (OIDC) requires npm >= 11.5.1. | |
| - name: Upgrade npm | |
| run: npm install -g npm@^11.5.1 | |
| - name: Install Bun | |
| uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 | |
| with: | |
| bun-version: 1.4.1 | |
| - name: Cache Bun install | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: ~/.bun/install/cache | |
| key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-bun- | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Verify workspace | |
| run: bun run verify | |
| - name: Create release PR or publish packages | |
| uses: changesets/action@8488615a623b1b9c987934bb89eae8af6a946ac1 # v2.1.1 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| publish-script: bun run release | |
| version-script: bun run version-packages | |
| pr-title: Release Platform packages | |
| commit-message: Release Platform packages | |
| push-git-tags: true | |
| env: | |
| # Publishing authenticates via npm trusted publishing (OIDC, id-token: write); | |
| # no NPM_TOKEN secret is needed. | |
| NPM_CONFIG_REGISTRY: https://registry.npmjs.org/ | |
| NPM_CONFIG_PROVENANCE: "true" |