Skip to content

Use Fixed versioning policy #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}}"
}
38 changes: 35 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,45 @@ 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 }}
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
3 changes: 0 additions & 3 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"arrowParens": "always",
"singleQuote": true,
"printWidth": 120,
"pluginSearchDirs": [
"."
],
"semi": false,
"trailingComma": "es5"
}
3 changes: 1 addition & 2 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"useWorkspaces": true,
"version": "independent",
"version": "1.0.0",
"command": {
"version": {
"private": false
Expand Down
Loading