Skip to content

Commit 1640826

Browse files
Automated PR creation
1 parent c7f63c8 commit 1640826

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

.github/workflows/create-release-pr.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
runs-on: ubuntu-latest
2121
permissions:
2222
contents: write
23+
pull-requests: write
2324
env:
2425
RELEASE_BRANCH: zcli-release
2526
steps:
@@ -57,14 +58,32 @@ jobs:
5758
yarn install --frozen-lockfile
5859
5960
- name: Version bump and update changelog
61+
id: version_bump
6062
run: |
6163
yarn lerna version \
6264
--conventional-commits \
6365
${{ inputs.release-type }} \
6466
--no-git-tag-version \
6567
--yes
6668
69+
VERSION=$(node -p "require('./lerna.json').version")
70+
echo "version=$VERSION" >> $GITHUB_OUTPUT
71+
6772
- name: Commit and push changes
6873
run: |
6974
git commit -am "chore(release): version bump"
7075
git push origin $RELEASE_BRANCH
76+
77+
- name: Create Pull Request
78+
env:
79+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80+
run: |
81+
VERSION="${{ steps.version_bump.outputs.version }}"
82+
83+
gh pr create \
84+
--base master \
85+
--head $RELEASE_BRANCH \
86+
--title "chore(release): v$VERSION" \
87+
--body "## Release v$VERSION
88+
Version bump and changelog updates.
89+
Merging this PR will trigger the release process."

.github/workflows/publish.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ jobs:
7272
NPM_TOTP_DEVICE: ${{ secrets.NPM_TOTP_DEVICE }}
7373

7474
- name: Push git tag
75-
if: success()
7675
run: |
7776
git push origin "v${{ steps.create_tag.outputs.version }}"
7877

0 commit comments

Comments
 (0)