diff --git a/.changes/unreleased/Added-20230421-111342.yaml b/.changes/unreleased/Added-20230421-111342.yaml new file mode 100644 index 0000000..e72565d --- /dev/null +++ b/.changes/unreleased/Added-20230421-111342.yaml @@ -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 diff --git a/action.yaml b/action.yaml index afd6183..e947607 100644 --- a/action.yaml +++ b/action.yaml @@ -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 @@ -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'