generated from dolittle/GitHub-Actions.TypeScript.Template
-
Notifications
You must be signed in to change notification settings - Fork 2
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
6a7d551
commit c8c0253
Showing
3 changed files
with
25 additions
and
11 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
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# GitHub Action - Add To Changelog | ||
![Github JavaScript Actions CI/CD](https://github.com/dolittle/add-to-changelog-action/workflows/Github%20JavaScript%20Actions%20CI/CD/badge.svg) | ||
|
||
This GitHub action prepends the release note from the PR body to the CHANGELOG.md file and commits and pushes the file to the current branch. | ||
This GitHub action prepends the release note from the PR body to the `CHANGELOG.md` file. It then commits and pushes the file. | ||
|
||
### Inputs | ||
- `version`: The version released | ||
|
@@ -36,6 +36,7 @@ jobs: | |
- run: yarn | ||
- run: yarn release | ||
|
||
# this outputs the PR body | ||
- name: Establish context | ||
id: context | ||
uses: dolittle/establish-context-action@v2 | ||
|
@@ -48,25 +49,28 @@ jobs: | |
version: ${{ steps.context.outputs.current-version }} | ||
release-type: ${{ steps.context.outputs.release-type }} | ||
|
||
- name: Create GitHub Release | ||
if: ${{ steps.context.outputs.should-publish == 'true' }} | ||
uses: dolittle/github-release-action@v2 | ||
with: | ||
token: ${{ secrets.BUILD_PAT }} | ||
version: ${{ steps.increment-version.outputs.next-version }} | ||
body: ${{ steps.context.outputs.pr-body }} | ||
|
||
- name: Prepend to Changelog | ||
if: ${{ steps.context.outputs.should-publish == 'true' }} | ||
uses: dolittle/add-to-changelog-action@v2 | ||
with: | ||
version: ${{ steps.increment-version.outputs.next-version }} | ||
# input for the text to prepend to | ||
body: ${{ steps.context.outputs.pr-body }} | ||
pr-url: ${{ steps.context.outputs.pr-url }} | ||
# path to changelog | ||
changelog-path: CHANGELOG.md | ||
# for committing and pushing | ||
user-email: [email protected] | ||
user-name: some-name | ||
token: ${{ github.token }} | ||
|
||
- name: Create GitHub Release | ||
if: ${{ steps.context.outputs.should-publish == 'true' }} | ||
uses: dolittle/github-release-action@v2 | ||
with: | ||
token: ${{ secrets.BUILD_PAT }} | ||
version: ${{ steps.increment-version.outputs.next-version }} | ||
body: ${{ steps.context.outputs.pr-body }} | ||
``` | ||
## Contributing | ||
|
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