Skip to content

Commit fc7ef86

Browse files
authored
Merge pull request #3 from ansidev/release/1.0.1-rc.0
Release v1.0.1-rc.0
2 parents 1732782 + d26e5dc commit fc7ef86

File tree

5 files changed

+46
-24
lines changed

5 files changed

+46
-24
lines changed

.github/workflows/release.yaml

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
env:
1111
BRANCH_MAIN: main
1212
BRANCH_DEVELOP: develop
13+
TAG_PREFIX: v
1314

1415
jobs:
1516
release:
@@ -36,32 +37,34 @@ jobs:
3637
VERSION=${BRANCH_NAME#hotfix/}
3738
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
3839
40+
- name: Set GitHub CLI token
41+
run: |
42+
echo "GH_TOKEN=${{ secrets.GH_TOKEN }}" >> $GITHUB_ENV
43+
3944
- name: Create release
40-
uses: ncipollo/release-action@v1
41-
with:
42-
token: ${{ secrets.GH_TOKEN }}
43-
commit: ${{ github.event.pull_request.merge_commit_sha }}
44-
tag: ${{ env.RELEASE_VERSION }}
45-
name: ${{ env.RELEASE_VERSION }}
46-
draft: false
47-
prerelease: false
48-
generateReleaseNotes: true
45+
env:
46+
RELEASE_TAG="${{ env.TAG_PREFIX }}${{ env.RELEASE_VERSION }}"
47+
run: |
48+
gh release create \
49+
${{ env.RELEASE_TAG }} \
50+
--target ${{ github.event.pull_request.merge_commit_sha }} \
51+
--title "${{ env.RELEASE_TAG }}" \
52+
--generate-notes
4953
5054
- name: Create merge PR ${{ github.event.pull_request.head.ref }} -> ${{ env.BRANCH_DEVELOP }}
51-
uses: peter-evans/create-pull-request@v4
52-
with:
53-
token: ${{ secrets.GH_TOKEN }}
54-
base: ${{ env.BRANCH_DEVELOP }}
55-
branch: ${{ github.event.pull_request.head.ref }}
56-
delete-branch: false
57-
commit-message: Merge branch '${{ github.event.pull_request.head.ref }}' into ${{ env.BRANCH_DEVELOP }}
58-
title: Merge branch '${{ github.event.pull_request.head.ref }}' into ${{ env.BRANCH_DEVELOP }}
59-
body: |
55+
env:
56+
PR_TITLE: Merge branch '${{ github.event.pull_request.head.ref }}' into ${{ env.BRANCH_DEVELOP }}
57+
PR_BODY: |
6058
This PR merges the ${{ github.event.pull_request.head.ref }} branch back into ${{ env.BRANCH_DEVELOP }} branch.
6159
This happens to ensure that the updates that happened on the ${{ github.event.pull_request.head.ref }} branch, i.e. CHANGELOG and manifest updates are also present on the ${{ env.BRANCH_DEVELOP }} branch.
62-
63-
Auto-generated by [create-pull-request][1]
64-
65-
[1]: https://github.com/peter-evans/create-pull-request
66-
labels: |
60+
PR_LABELS: |
6761
automated-pr
62+
run: |
63+
gh pr create \
64+
--base ${{ env.BRANCH_DEVELOP }} \
65+
--head ${{ github.event.pull_request.head.ref }} \
66+
--target ${{ github.event.pull_request.merge_commit_sha }} \
67+
--title "${{ env.PR_TITLE }}" \
68+
--body "${{ env.PR_BODY }}" \
69+
--label "${{ env.PR_LABEL }}" \
70+
--fill

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Taskfile.yaml

.versionrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"bumpFiles": [
3+
{
4+
"filename": "VERSION",
5+
"type": "plain-text"
6+
}
7+
]
8+
}

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,14 @@ All notable changes to this project will be documented in this file. See [standa
66

77
### Features
88

9+
* **github-actions:** update workflow using GitHub CLI ([d46d2c0](https://github.com/ansidev/sample-gitflow-release-workflows/commit/d46d2c0d4fcde955b68d40400d51a33747a73016))
10+
11+
### Bug Fixes
12+
13+
* **github-actions:** rename repository secret variable GITHUB_TOKEN to GH_TOKEN ([5da410e](https://github.com/ansidev/sample-gitflow-release-workflows/commit/5da410ee04fe1151835df35f4795dab51d18aa18))
14+
15+
### 1.0.0-rc.1 (2023-02-12)
16+
17+
### Features
18+
919
* **ci:** add workflow release ([b6d71ae](https://github.com/ansidev/sample-gitflow-release-workflows/commit/b6d71aeb3e913af7261e62c9091802078f6cb6b5))

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.0-rc.1
1+
1.0.1-rc.0

0 commit comments

Comments
 (0)