chore(deps): lock file maintenance (#2091) #987
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 | |
| permissions: | |
| id-token: write | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: GitHub context | |
| run: echo "$GITHUB_CONTEXT" | |
| env: | |
| GITHUB_CONTEXT: ${{ toJson(github) }} | |
| - name: Checkout | |
| if: github.ref == 'refs/heads/main' | |
| uses: actions/checkout@v5 | |
| - name: Install pnpm | |
| uses: pnpm/[email protected] | |
| with: | |
| run_install: false | |
| - name: Fetch all tags (for releases) | |
| run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
| - name: Setup Node (uses version in .nvmrc) | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'pnpm' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Storing release version for changeset | |
| id: release_version | |
| run: ./scripts/echo-release-version.sh | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| - name: Ouptut version | |
| run: echo "The version is ${{ steps.release_version.outputs.VERSION }}" | |
| - name: Building packages | |
| run: pnpm build | |
| - name: Create Release Pull Request or Publish to npm | |
| id: changesets | |
| # uses: changesets/action@v1 | |
| uses: dotansimha/[email protected] | |
| with: | |
| publish: pnpm changeset publish | |
| version: pnpm changeset:version-and-format | |
| title: 'ci(changesets): version packages' | |
| commit: 'ci(changesets): version packages' | |
| createGithubReleases: aggregate | |
| githubReleaseName: v${{ steps.release_version.outputs.VERSION }} | |
| githubTagName: v${{ steps.release_version.outputs.VERSION }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| - name: Publishing canary releases to npm registry | |
| if: steps.changesets.outputs.published != 'true' && github.ref == 'refs/heads/main' | |
| run: | | |
| git checkout main | |
| pnpm changeset version --snapshot canary | |
| pnpm changeset publish --tag canary | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |