Skip to content

Commit

Permalink
Add version-command variable to run custom commands to set a version
Browse files Browse the repository at this point in the history
  • Loading branch information
mvantellingen committed Apr 21, 2023
1 parent 419965f commit 97a7153
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changes/unreleased/Added-20230421-111342.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Added
body: Add version-command variable to run custom commands to set a version
time: 2023-04-21T11:13:42.702786+02:00
11 changes: 11 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ inputs:
description: 'The GitHub token'
required: true

version-command:
description: 'Command to set the version in the package'
required: false

release-workflow:
description: "Name of the release workflow to trigger"
required: false
Expand Down Expand Up @@ -68,6 +72,13 @@ runs:
version: latest
args: latest

- name: Set the version in the package
if: inputs.version-command && steps.drafts.outputs.exists == 'true' || (steps.changes.outputs.changelog == 'true' && steps.changes.outputs.notes == 'true')
run: ${{ inputs.version-command }}
shell: bash
env:
PACKAGE_VERSION: ${{ steps.latest.outputs.output }}

- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
if: steps.drafts.outputs.exists == 'true'
Expand Down

0 comments on commit 97a7153

Please sign in to comment.