Skip to content

Commit

Permalink
Merge pull request #123 from n-thumann/fix_bump-version_action
Browse files Browse the repository at this point in the history
Fix & rework bump-version GitHub action
  • Loading branch information
n-thumann authored Dec 21, 2021
2 parents 814fa00 + eff2859 commit 41a7daf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ jobs:
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git checkout -b bump_version
- name: Bump version
run: >
echo "BUMPED_VERSION=$(
npm version --commit-hooks false --git-tag-version false patch
npm version --git-tag-version false patch
)" | tee -a $GITHUB_ENV
- name: Checkout and push branch
- name: Git push branch
run: |
git checkout -b bump_version_${{ env.BUMPED_VERSION }}
git push origin bump_version_${{ env.BUMPED_VERSION }}
git push origin bump_version
- name: Create PR
uses: actions/github-script@v5
Expand All @@ -44,7 +44,7 @@ jobs:
owner: context.repo.owner,
repo: context.repo.repo,
title: "Bump version to ${{ env.BUMPED_VERSION }}"
head: bump_version_${{ env.BUMPED_VERSION }},
head: bump_version
base: "main",
body: "This PR bumps the version to ${{ env.bumped_tag }}, as requested by @${{ github.actor }} in https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}."
body: "This PR bumps the version to ${{ env.BUMPED_VERSION }}, as requested by @${{ github.actor }} in https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}."
})

0 comments on commit 41a7daf

Please sign in to comment.