Skip to content

Commit

Permalink
feat: defined branch variable in action
Browse files Browse the repository at this point in the history
  • Loading branch information
diegog-sf committed Sep 24, 2024
1 parent 1d85970 commit 9466c1a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ inputs:
token:
description: 'The GitHub access token to allow file reading and tag creation.'
required: true
branch:
description: 'The target branch from which the tag will be created.'
required: false

runs:
using: 'composite'
Expand All @@ -45,4 +48,4 @@ runs:
set -e
dart pub global activate -sgit https://github.com/peiffer-innovations/actions-dart-version-autotag
dart pub global run dart_version_autotag:tag --token ${{ inputs.token }} --path ${{ inputs.path }} --prefix "${{ inputs.prefix }}" --repository ${{ github.repository }} --changelog ${{inputs.changelog}} --major ${{inputs.major}} --minor ${{inputs.minor}} --overwrite ${{inputs.overwrite}}
dart pub global run dart_version_autotag:tag --token ${{ inputs.token }} --path ${{ inputs.path }} --prefix "${{ inputs.prefix }}" --repository ${{ github.repository }} --changelog ${{inputs.changelog}} --major ${{inputs.major}} --minor ${{inputs.minor}} --overwrite ${{inputs.overwrite}} --branch ${{inputs.branch}}
1 change: 1 addition & 0 deletions lib/tag.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ Future<void> main(List<String>? args) async {
'prefix': prefix,
'slug': slug,
'version': version,
if (branchName != null) 'branch': branchName,
};
_logger.info('Options:');
for (var entry in options.entries) {
Expand Down

0 comments on commit 9466c1a

Please sign in to comment.