Skip to content

Commit

Permalink
Improve PR body text
Browse files Browse the repository at this point in the history
Make the workflow text optional if there is a rlease workfow defined
  • Loading branch information
mvantellingen committed Apr 22, 2023
1 parent cb38dcd commit ef5a45f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
release-workflow: ''
version-command: |
sed -r -i '' 's#(labd/changie-release-action@)([^[:space:]]+)#\1'"${PACKAGE_VERSION}"'#' README.md
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# changie-release-action
Automate version and release management using [changie](https://github.com/miniscruff/changie)

This action creates a new PR with an updated `CHANGELOG.md` file. When merged it will automatically
create a new tag and trigger another GitHub action workflow that can then do the actual release.
This action creates a new PR with an updated `CHANGELOG.md` file. When merged it
will automatically create a new tag and trigger another GitHub action workflow
that can then do the actual release.

The workflow is inspired both by [changie](https://github.com/miniscruff/changie) and [@changesets/action](https://github.com/changesets/action)
The workflow is inspired both by [changie](https://github.com/miniscruff/changie)
and [@changesets/action](https://github.com/changesets/action)

## Usage

Expand Down Expand Up @@ -34,11 +36,15 @@ jobs:
uses: labd/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}


# Optionally run a command with the new version number when the new
# version is determined.
version-command: 'echo "New version is $PACKAGE_VERSION" > version.txt'

# Trigger another release workflow to do the actual release.
# Set to for example `release.yaml` to trigger that workflow.
# Default is no trigger
release-workflow: 'release.yaml'
release-workflow: 'release.yaml'
```
## Triggering a release
Expand Down
2 changes: 1 addition & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ runs:
commit-message: Release ${{ steps.latest.outputs.output }}
token: ${{ inputs.github-token }}
body: |
This PR was created by the [Changie release GitHub action](https://github.com/labd/changie-release-action). When you're ready to do a release, you can merge this and the tag ${{ steps.latest.outputs.output}} will be created and the release workflow will be started. If you're not ready to do a release yet, that's fine, whenever you add more changes to main, this PR will be updated.
This PR was created by the [Changie release GitHub action](https://github.com/labd/changie-release-action). When you're ready to do a release, you can merge this and the tag ${{ steps.latest.outputs.output }} will be created${{ inputs.release-workflow != '' && format(' and the {0} workflow will be started', inputs.release-workflow) || '' }}. If you're not ready to do a release yet, that's fine, whenever you add more changes to main, this PR will be updated.
# Releases
${{ steps.changelog.outputs.output }}
Expand Down

0 comments on commit ef5a45f

Please sign in to comment.