File tree 1 file changed +39
-6
lines changed
1 file changed +39
-6
lines changed Original file line number Diff line number Diff line change 4
4
push :
5
5
branches : [main]
6
6
7
+ concurrency : ${{ github.workflow }}-${{ github.ref }}
8
+
7
9
jobs :
8
- release :
10
+ prepare :
9
11
runs-on : ubuntu-latest
10
12
steps :
11
13
- uses : actions/checkout@v4
@@ -14,14 +16,45 @@ jobs:
14
16
15
17
- uses : ./.github/actions/setup
16
18
17
- - name : build packs
18
- run : pnpm build
19
-
20
19
- name : Create versions or publish to npm registry
21
20
uses : changesets/action@v1
22
21
with :
23
- publish : pnpm release
24
- commit : ' ci(changeset): release milkdown'
22
+ version : pnpm ci:version
23
+ commit : " chore: version packages"
24
+ title : " chore: version packages"
25
+ createGithubReleases : false
25
26
env :
26
27
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
28
+
29
+ publish :
30
+ runs-on : ubuntu-latest
31
+ steps :
32
+ - uses : actions/checkout@v4
33
+ with :
34
+ fetch-depth : 0
35
+
36
+ - uses : ./.github/actions/setup
37
+
38
+ - name : build packs
39
+ run : pnpm build
40
+
41
+ - name : Publish to NPM
42
+ run : |
43
+ pnpm ci:publish
44
+ env :
27
45
NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
46
+
47
+ - name : Get package version
48
+ run : |
49
+ MILKDOWN_VERSION=$(jq -r ".version" packages/kit/package.json)
50
+ echo "MILKDOWN_RELEASE_TAG=v${MILKDOWN_VERSION}" >> "$GITHUB_ENV"
51
+
52
+ - name : Create GitHub release
53
+ uses : ncipollo/release-action@v1
54
+ with :
55
+ commit : main
56
+ tag : " ${{ env.MILKDOWN_RELEASE_TAG }}"
57
+ body : " Please refer to [CHANGELOG.md](https://github.com/milkdown/milkdown/blob/${{ env.MILKDOWN_RELEASE_TAG }}/packages/kit/CHANGELOG.md) for details."
58
+ token : ${{ secrets.GITHUB_TOKEN }}
59
+ continue-on-error : true
60
+
You can’t perform that action at this time.
0 commit comments