Skip to content

Commit ff5b334

Browse files
committed
Update GH actions
1 parent dbcf804 commit ff5b334

File tree

3 files changed

+87
-3
lines changed

3 files changed

+87
-3
lines changed

.github/changelog-configuration.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"pr_template": "- ${{TITLE}} by @${{AUTHOR}} (#${{NUMBER}})",
3+
"label_extractor": [
4+
{
5+
"pattern": "release ([a-z:-]+)",
6+
"target": "$1",
7+
"method": "match"
8+
}
9+
],
10+
"categories": [
11+
{
12+
"title": "## 🚀 Features",
13+
"key": "features",
14+
"labels": [
15+
"minor"
16+
]
17+
},
18+
{
19+
"title": "## 🛠️ Minor Changes",
20+
"labels": [
21+
"internal"
22+
]
23+
},
24+
{
25+
"title": "## 🔎 Breaking Changes",
26+
"labels": [
27+
"major"
28+
]
29+
},
30+
{
31+
"title": "## 🐛 Fixes",
32+
"labels": [
33+
"patch"
34+
]
35+
},
36+
{
37+
"title": "## 📄 Documentation",
38+
"labels": [
39+
"documentation"
40+
]
41+
},
42+
{
43+
"title": "## 🔗 Dependency Updates",
44+
"labels": [
45+
"dependencies"
46+
]
47+
}
48+
],
49+
"template": "${{CHANGELOG}}"
50+
}

.github/workflows/release.yaml

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,46 @@ jobs:
2828

2929
- name: Setup npm publish
3030
run:
31-
echo "//registry.npmjs.org/:_authToken=${{ secrets. NPM_TOKEN }}" >> ./.npmrc
31+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ./.npmrc
3232

33-
- name: Create Release
33+
- name: Build
3434
env:
3535
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
3636
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3737
run: |
3838
npm install
3939
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+
SEMVER_TYPE: prepatch # just to avoid publishing real 2.0.0
51+
run: |
52+
npx lerna version ${{ env.SEMVER_TYPE }} --force-publish --ignore-changes --preid rc --yes --message "Bump versions [skip ci]"
53+
#npx lerna publish from-git --yes
54+
echo "NEXT_VERSION=$(yq e '.version' -o yaml lerna.json)" >> $GITHUB_ENV
55+
56+
- name: Build changelog
57+
id: build_changelog
58+
uses: mikepenz/release-changelog-builder-action@v3
59+
with:
60+
configuration: ".github/changelog-configuration.json"
61+
outputFile: .github/release-notes.md
62+
# PreReleases still get a changelog, but the next full release gets a diff since the last full release,
63+
# combining possible changelogs of all previous PreReleases in between.
64+
# PreReleases show a partial changelog since last PreRelease.
65+
ignorePreReleases: "${{ !contains(env.NEXT_VERSION, '-rc') }}"
66+
env:
67+
GITHUB_TOKEN: ${{ github.token }}
68+
69+
- name: Create Release
70+
env:
71+
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
72+
run: |
73+
gh release create "v${{ env.NEXT_VERSION }}" --notes-file .github/release-notes.md --prerelease=${{ contains(env.NEXT_VERSION, '-rc') }} --title "v${{ env.NEXT_VERSION }}"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ node_modules/
2828
# generated output
2929
dist
3030
/angular.json
31+
.github/release-notes.md
3132

3233
# test output
3334
playwright-report

0 commit comments

Comments
 (0)