Skip to content

Commit

Permalink
Merge pull request #3 from ansidev/release/1.0.1-rc.0
Browse files Browse the repository at this point in the history
Release v1.0.1-rc.0
  • Loading branch information
ansidev authored Feb 12, 2023
2 parents 1732782 + d26e5dc commit fc7ef86
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 24 deletions.
49 changes: 26 additions & 23 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
env:
BRANCH_MAIN: main
BRANCH_DEVELOP: develop
TAG_PREFIX: v

jobs:
release:
Expand All @@ -36,32 +37,34 @@ jobs:
VERSION=${BRANCH_NAME#hotfix/}
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
- name: Set GitHub CLI token
run: |
echo "GH_TOKEN=${{ secrets.GH_TOKEN }}" >> $GITHUB_ENV
- name: Create release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GH_TOKEN }}
commit: ${{ github.event.pull_request.merge_commit_sha }}
tag: ${{ env.RELEASE_VERSION }}
name: ${{ env.RELEASE_VERSION }}
draft: false
prerelease: false
generateReleaseNotes: true
env:
RELEASE_TAG="${{ env.TAG_PREFIX }}${{ env.RELEASE_VERSION }}"
run: |
gh release create \
${{ env.RELEASE_TAG }} \
--target ${{ github.event.pull_request.merge_commit_sha }} \
--title "${{ env.RELEASE_TAG }}" \
--generate-notes
- name: Create merge PR ${{ github.event.pull_request.head.ref }} -> ${{ env.BRANCH_DEVELOP }}
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GH_TOKEN }}
base: ${{ env.BRANCH_DEVELOP }}
branch: ${{ github.event.pull_request.head.ref }}
delete-branch: false
commit-message: Merge branch '${{ github.event.pull_request.head.ref }}' into ${{ env.BRANCH_DEVELOP }}
title: Merge branch '${{ github.event.pull_request.head.ref }}' into ${{ env.BRANCH_DEVELOP }}
body: |
env:
PR_TITLE: Merge branch '${{ github.event.pull_request.head.ref }}' into ${{ env.BRANCH_DEVELOP }}
PR_BODY: |
This PR merges the ${{ github.event.pull_request.head.ref }} branch back into ${{ env.BRANCH_DEVELOP }} branch.
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.
Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
labels: |
PR_LABELS: |
automated-pr
run: |
gh pr create \
--base ${{ env.BRANCH_DEVELOP }} \
--head ${{ github.event.pull_request.head.ref }} \
--target ${{ github.event.pull_request.merge_commit_sha }} \
--title "${{ env.PR_TITLE }}" \
--body "${{ env.PR_BODY }}" \
--label "${{ env.PR_LABEL }}" \
--fill
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Taskfile.yaml
8 changes: 8 additions & 0 deletions .versionrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"bumpFiles": [
{
"filename": "VERSION",
"type": "plain-text"
}
]
}
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,14 @@ All notable changes to this project will be documented in this file. See [standa

### Features

* **github-actions:** update workflow using GitHub CLI ([d46d2c0](https://github.com/ansidev/sample-gitflow-release-workflows/commit/d46d2c0d4fcde955b68d40400d51a33747a73016))

### Bug Fixes

* **github-actions:** rename repository secret variable GITHUB_TOKEN to GH_TOKEN ([5da410e](https://github.com/ansidev/sample-gitflow-release-workflows/commit/5da410ee04fe1151835df35f4795dab51d18aa18))

### 1.0.0-rc.1 (2023-02-12)

### Features

* **ci:** add workflow release ([b6d71ae](https://github.com/ansidev/sample-gitflow-release-workflows/commit/b6d71aeb3e913af7261e62c9091802078f6cb6b5))
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0-rc.1
1.0.1-rc.0

0 comments on commit fc7ef86

Please sign in to comment.