Skip to content

Commit 50a81f9

Browse files
authored
Merge pull request #50 from tabkram/ci/release
ci: add release workflow via PR
2 parents fac6193 + f112481 commit 50a81f9

1 file changed

Lines changed: 23 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,31 @@ jobs:
3939
npm version $VERSION_BUMP --no-git-tag-version -m "chore(release): %s"
4040
npx conventional-changelog -p conventionalcommits -i CHANGELOG.md -s
4141
42-
- name: Commit & Push Changes
42+
- name: Commit Changes
4343
run: |
4444
git config --global user.name "github-actions[bot]"
4545
git config --global user.email "github-actions[bot]@users.noreply.github.com"
4646
git add .
4747
git commit -m "chore(release): $(node -p "require('./package.json').version")"
48-
git push --follow-tags
48+
49+
- name: Create Pull Request
50+
uses: peter-evans/create-pull-request@v7
51+
with:
52+
token: ${{ secrets.GITHUB_TOKEN }}
53+
title: "Release version $(node -p "require('./package.json').version")"
54+
body: "This PR bumps the version to $(node -p "require('./package.json').version")."
55+
base: main
56+
branch: release/${{ github.event.inputs.version-bump }}
57+
draft: false
58+
59+
- name: Merge Pull Request
60+
run: |
61+
gh pr merge "release/${{ github.event.inputs.version-bump }}" --merge --auto --admin
62+
env:
63+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
65+
- name: Push Tags
66+
run: |
67+
git push --follow-tags
68+
env:
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)