Skip to content

Commit

Permalink
feat(.github/actions/create-release-pr-for-gem): tag-prefix を指定して、任意の…
Browse files Browse the repository at this point in the history
… プレフィックスでタグを打てるようにする (#4)
  • Loading branch information
meriy100 authored Apr 4, 2024
1 parent b16e76b commit e2f6dc8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/actions/create-release-pr-for-gem/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ inputs:
commit-user-name:
description: The name of the user who created the commit
default: "github-actions[bot]"
tag-prefix:
description: The tag prefix
default: "v"

runs:
using: "composite"
Expand All @@ -36,6 +39,7 @@ runs:
git-push: false
skip-commit: true
skip-tag: true
tab-prefix: ${{ inputs.tag-prefix }}
github-token: ${{ env.GITHUB_TOKEN }}
- name: Commit version up commit
if: ${{ steps.changelog.outputs.skipped == 'false' }}
Expand All @@ -48,12 +52,12 @@ runs:
printf "# frozen_string_literal: true\n\nmodule ${{ inputs.version-module-name }}\n VERSION = '$VERSION'\nend\n" > ${{ inputs.version-file-path }}
git add ${{ inputs.version-file-path }}
git commit -m "chore: bump version to v$VERSION"
git push origin release/v$VERSION
git push origin release/${{ inputs.tag-prefix }}$VERSION
shell: bash
- name: Create Pull Request
if: ${{ steps.changelog.outputs.skipped == 'false' }}
env:
GH_TOKEN: ${{ env.GITHUB_TOKEN }}
run: |
gh pr create --title "chore: Release version to v${{ steps.changelog.outputs.version }}" --body "${{ steps.changelog.outputs.clean_changelog }}" --base ${{ inputs.base-branch }} --head release/v${{ steps.changelog.outputs.version }}
gh pr create --title "chore: Release version to v${{ steps.changelog.outputs.version }}" --body "${{ steps.changelog.outputs.clean_changelog }}" --base ${{ inputs.base-branch }} --head release/${{ inputs.tag-prefix }}${{ steps.changelog.outputs.version }}
shell: bash

0 comments on commit e2f6dc8

Please sign in to comment.