fix: style #468
This file contains 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 }} | |
jobs: | |
prepare: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
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 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: ./.github/actions/setup | |
- name: build packs | |
run: pnpm build | |
- name: Publish to NPM | |
run: pnpm ci:publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- 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 |