-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f6f8161
commit f6adcc4
Showing
1 changed file
with
10 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,20 +20,21 @@ jobs: | |
env: | ||
VERSION: ${{ github.event.inputs.version }} | ||
run: | | ||
# Generate the changelog without creating a tag or commit | ||
npx --yes [email protected] --release-as "$VERSION" --skip.tag --skip.commit --tag-prefix=v | ||
git config --global user.name 'github-actions' | ||
# Stage the new or updated CHANGELOG.md file | ||
git add CHANGELOG.md | ||
# Set up Git configuration | ||
git config --global user.name 'github-actions' | ||
git config --global user.email '[email protected]' | ||
# Create a release branch with the version and push it | ||
git checkout -q -b "release-$VERSION" | ||
git commit -am "chore(release): $VERSION" | ||
git push -q -u origin "release-$VERSION" | ||
- name: Get changelog diff | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const get_change_log_diff = require('./scripts/get_changelog_diff.js') | ||
core.exportVariable('CHANGELOG', get_change_log_diff()) | ||
- name: Open pull request | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
@@ -44,4 +45,4 @@ jobs: | |
Make sure to use squash & merge when merging! | ||
Once this is merged, another job will kick off automatically and publish the package. | ||
# :memo: Changelog | ||
${{ env.CHANGELOG }}" | ||
$(cat CHANGELOG.md)" |