Skip to content

Commit

Permalink
Merge pull request #46 from ansidev/release/1.1.4
Browse files Browse the repository at this point in the history
Release v1.1.4
  • Loading branch information
ansidev authored Jun 13, 2023
2 parents 324b2d7 + 6681a25 commit 564302a
Show file tree
Hide file tree
Showing 18 changed files with 282 additions and 294 deletions.
21 changes: 21 additions & 0 deletions .changes/v1.1.4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## [v1.1.4](https://github.com/ansidev/sample-gitflow-release-workflows/compare/v1.1.3...v1.1.4) (2023-06-13)

### Bug Fixes

- **changelog:** update chglog config

- **changelog:** correct changelog configs

### Documentations

- **readme:** update README.md

### Features

- **taskfile:** add taskfiles

### Others

- **github-workflow:** update workflows, apply actions from ghacts/gitflow

Full Changelog: [v1.1.3...v1.1.4](https://github.com/ansidev/sample-gitflow-release-workflows/compare/v1.1.3...v1.1.4)
2 changes: 1 addition & 1 deletion .changie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ newlines:
endOfVersion: 1
replacements:
- path: "VERSION"
find: ".*"
find: ".+"
replace: "{{.VersionNoPrefix}}"
4 changes: 4 additions & 0 deletions .chglog/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@ options:
- perf
- refactor
- docs
- build
- ci
commit_groups:
title_maps:
feat: Features
fix: Bug Fixes
perf: Performance Improvements
refactor: Code Refactoring
docs: Documentations
build: Others
ci: Others
header:
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
pattern_maps:
Expand Down
16 changes: 16 additions & 0 deletions .github/FUNDING.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# These are supported funding model platforms

github: [ansidev]
patreon: ansidev
# open_collective: # Replace with a single Open Collective username
ko_fi: ansidev
# tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
# community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
# liberapay: # Replace with a single Liberapay username
# issuehunt: # Replace with a single IssueHunt username
# otechie: # Replace with a single Otechie username
# lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom:
- "https://www.paypal.me/ansidev"
- "https://www.buymeacoffee.com/ansidev"
- "https://me.momo.vn/ansidev"
40 changes: 0 additions & 40 deletions .github/workflows/auto_merge_release_hotfix_into_develop.yaml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/create_release_pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: create_release_pr

on:
push:
branches:
- "release/**"
- "hotfix/**"

jobs:
create_release_pr:
name: Create release pull request
runs-on: ubuntu-latest
permissions:
contents: write
# only create draft pull requests on
# pushing to branches 'release/' or 'hotfix/'
if: |
startsWith(github.ref_name, 'release/') ||
startsWith(github.ref_name, 'hotfix/')
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.ref_name }}
token: ${{ secrets.GH_TOKEN }}
# needed by "gh pr create"
fetch-depth: 0

- name: Set release type as release
if: startsWith(github.ref_name, 'release/')
run: echo "RELEASE_TYPE=release" >> "$GITHUB_ENV"

- name: Set release type as hotfix
if: startsWith(github.ref_name, 'hotfix/')
run: echo "RELEASE_TYPE=hotfix" >> "$GITHUB_ENV"

- name: Test action 'Create release PR'
uses: ghacts/gitflow/create-release-pr@main
with:
token: ${{ secrets.GH_TOKEN }}
release-type: ${{ env.RELEASE_TYPE }}
release-branch-prefix: '${{ env.RELEASE_TYPE }}/'
86 changes: 0 additions & 86 deletions .github/workflows/draft_release_hotfix_pr.yaml

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/merge_release_into_develop.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: merge_release_into_develop

on:
pull_request:
types:
- opened
branches:
- develop

jobs:
merge_release_into_develop:
name: Merge release into develop
runs-on: ubuntu-latest
permissions:
contents: write
# only merge pull requests that begin with 'release/' or 'hotfix/'
if: |
startsWith(github.head_ref, 'release/') ||
startsWith(github.head_ref, 'hotfix/')
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GH_TOKEN }}
# needed by "gh pr create"
fetch-depth: 0

- name: Test action 'Merge release into develop'
uses: ghacts/gitflow/merge-release-into-develop@main
with:
token: ${{ secrets.GH_TOKEN }}
release-branch: ${{ github.head_ref }}
develop-branch: develop
54 changes: 54 additions & 0 deletions .github/workflows/publish_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: publish_release

on:
pull_request:
types:
- closed
branches:
- main

env:
VERSION_TAG_PREFIX: "v"

jobs:
release:
name: Publish release
runs-on: ubuntu-latest
permissions:
contents: write
# only merge pull requests that begin with 'release/' or 'hotfix/'
if: github.event.pull_request.merged == true &&
(startsWith(github.head_ref, 'release/') || startsWith(github.head_ref, 'hotfix/'))

steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GH_TOKEN }}
# needed by "gh pr create"
fetch-depth: 0

- name: Set release type as release
if: startsWith(github.head_ref, 'release/')
run: echo "RELEASE_TYPE=release" >> "$GITHUB_ENV"

- name: Set release type as hotfix
if: startsWith(github.head_ref, 'hotfix/')
run: echo "RELEASE_TYPE=hotfix" >> "$GITHUB_ENV"

- name: Extract version from release branch
env:
BRANCH_NAME: ${{ github.head_ref }}
BRANCH_PREFIX: '${{ env.RELEASE_TYPE }}/'
run: |
RELEASE_VERSION=${BRANCH_NAME#${BRANCH_PREFIX}}
echo "RELEASE_VERSION=${RELEASE_VERSION}" >> $GITHUB_ENV
- name: Test action 'Publish release'
uses: ghacts/gitflow/publish-release@main
with:
token: ${{ secrets.GH_TOKEN }}
release-type: ${{ env.RELEASE_TYPE }}
release-branch-prefix: '${{ env.RELEASE_TYPE }}/'
notes-file: '.changes/${{ env.VERSION_TAG_PREFIX }}${{ env.RELEASE_VERSION }}.md'
Loading

0 comments on commit 564302a

Please sign in to comment.