Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(.github/actions/create-release-pr-for-gem): tag-prefix を指定して、任意の プレフィックスでタグを打てるようにする #4

Merged
merged 1 commit into from
Apr 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading