Skip to content

Commit

Permalink
Update GH actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ccremer committed Aug 5, 2023
1 parent c0351e2 commit 4ff9721
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 3 deletions.
50 changes: 50 additions & 0 deletions .github/changelog-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"pr_template": "- ${{TITLE}} by @${{AUTHOR}} (#${{NUMBER}})",
"label_extractor": [
{
"pattern": "release ([a-z:-]+)",
"target": "$1",
"method": "match"
}
],
"categories": [
{
"title": "## 🚀 Features",
"key": "features",
"labels": [
"minor"
]
},
{
"title": "## 🛠️ Minor Changes",
"labels": [
"internal"
]
},
{
"title": "## 🔎 Breaking Changes",
"labels": [
"major"
]
},
{
"title": "## 🐛 Fixes",
"labels": [
"patch"
]
},
{
"title": "## 📄 Documentation",
"labels": [
"documentation"
]
},
{
"title": "## 🔗 Dependency Updates",
"labels": [
"dependencies"
]
}
],
"template": "${{CHANGELOG}}"
}
39 changes: 36 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,46 @@ jobs:

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

- name: Create Release
- name: Build
env:
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm install
npm run build
npm run release
- name: Determine Semver
env:
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
run: |
echo "SEMVER_TYPE=$(npx auto version)" >> $GITHUB_ENV
- name: Publish Packages
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
SEMVER_TYPE: prepatch # just to avoid publishing real 2.0.0
run: |
npx lerna version ${{ env.SEMVER_TYPE }} --force-publish --ignore-changes --preid rc --yes --message "Bump versions [skip ci]"
#npx lerna publish from-git --yes
echo "NEXT_VERSION=$(yq e '.version' -o yaml lerna.json)" >> $GITHUB_ENV
- name: Build changelog
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v3
with:
configuration: ".github/changelog-configuration.json"
outputFile: .github/release-notes.md
# PreReleases still get a changelog, but the next full release gets a diff since the last full release,
# combining possible changelogs of all previous PreReleases in between.
# PreReleases show a partial changelog since last PreRelease.
ignorePreReleases: "${{ !contains(env.NEXT_VERSION, '-rc') }}"
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
run: |
gh release create "v${{ env.NEXT_VERSION }}" --notes-file .github/release-notes.md --prerelease=${{ contains(env.NEXT_VERSION, '-rc') }} --title "v${{ env.NEXT_VERSION }}"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ node_modules/
# generated output
dist
/angular.json
.github/release-notes.md

# test output
playwright-report
Expand Down

0 comments on commit 4ff9721

Please sign in to comment.