chore: Lock file maintenance (#2152) #864
  
    
      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] | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| env: | |
| CI: true | |
| jobs: | |
| prepare: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - uses: ./.github/actions/setup | |
| - name: Create versions or publish to npm registry | |
| uses: changesets/action@v1 | |
| with: | |
| version: pnpm ci:version | |
| commit: 'chore: version packages' | |
| title: 'chore: version packages' | |
| createGithubReleases: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - uses: ./.github/actions/setup | |
| - name: Build packages | |
| run: pnpm build | |
| - name: Publish to NPM | |
| run: pnpm ci:publish | |
| - name: Get package version | |
| run: | | |
| MILKDOWN_VERSION=$(jq -r ".version" packages/kit/package.json) | |
| echo "MILKDOWN_RELEASE_TAG=v${MILKDOWN_VERSION}" >> "$GITHUB_ENV" | |
| - name: Create GitHub release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| commit: main | |
| tag: '${{ env.MILKDOWN_RELEASE_TAG }}' | |
| body: 'Please refer to [CHANGELOG.md](https://github.com/milkdown/milkdown/blob/${{ env.MILKDOWN_RELEASE_TAG }}/packages/kit/CHANGELOG.md) for details.' | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| continue-on-error: true |