@@ -28,13 +28,45 @@ jobs:
28
28
29
29
- name : Setup npm publish
30
30
run :
31
- echo "//registry.npmjs.org/:_authToken=${{ secrets. NPM_TOKEN }}" >> ./.npmrc
31
+ echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ./.npmrc
32
32
33
- - name : Create Release
33
+ - name : Build
34
34
env :
35
35
GH_TOKEN : ${{ secrets.RELEASE_TOKEN }}
36
36
NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
37
37
run : |
38
38
npm install
39
39
npm run build
40
- npm run release
40
+
41
+ - name : Determine Semver
42
+ env :
43
+ GH_TOKEN : ${{ secrets.RELEASE_TOKEN }}
44
+ run : |
45
+ echo "SEMVER_TYPE=$(npx auto version)" >> $GITHUB_ENV
46
+
47
+ - name : Publish Packages
48
+ env :
49
+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
50
+ run : |
51
+ npx lerna version ${{ env.SEMVER_TYPE }} --force-publish --ignore-changes --preid rc --yes --message "Bump versions [skip ci]"
52
+ npx lerna publish from-git --yes
53
+ echo "NEXT_VERSION=$(yq e '.version' -o yaml lerna.json)" >> $GITHUB_ENV
54
+
55
+ - name : Build changelog
56
+ id : build_changelog
57
+ uses : mikepenz/release-changelog-builder-action@v3
58
+ with :
59
+ configuration : " .github/changelog-configuration.json"
60
+ outputFile : .github/release-notes.md
61
+ # PreReleases still get a changelog, but the next full release gets a diff since the last full release,
62
+ # combining possible changelogs of all previous PreReleases in between.
63
+ # PreReleases show a partial changelog since last PreRelease.
64
+ ignorePreReleases : " ${{ !contains(env.NEXT_VERSION, '-rc') }}"
65
+ env :
66
+ GITHUB_TOKEN : ${{ github.token }}
67
+
68
+ - name : Create Release
69
+ env :
70
+ GITHUB_TOKEN : ${{ secrets.RELEASE_TOKEN }}
71
+ run : |
72
+ gh release create "v${{ env.NEXT_VERSION }}" --notes-file .github/release-notes.md --prerelease=${{ contains(env.NEXT_VERSION, '-rc') }} --title "v${{ env.NEXT_VERSION }}"
0 commit comments