Skip to content

Commit 80d9645

Browse files
committed
Update GH actions
1 parent dbcf804 commit 80d9645

File tree

3 files changed

+86
-3
lines changed

3 files changed

+86
-3
lines changed
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: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,45 @@ 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+
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 }}"

.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)