Skip to content

Commit

Permalink
Enhancement (ci): Add release drafter (startersclan#116)
Browse files Browse the repository at this point in the history
This adds automatic releases with change logs.

Co-authored-by: leo <[email protected]>
Co-authored-by: joe <[email protected]>
  • Loading branch information
leojonathanoh and joeltimothyoh authored Mar 6, 2023
1 parent cf9ca44 commit 5e38f71
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- 'change'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bug'
- title: '🖊️ Refactors'
labels:
- 'refactor'
- title: '👗 Style'
labels:
- 'style'
- title: '📝 Documentation'
labels:
- 'docs'
- 'documentation'
- title: '🧰 Maintenance'
label: 'chore'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
version-resolver:
major:
labels:
- 'breaking'
minor:
labels:
- 'feature'
- 'enhancement'
- 'change'
- 'refactor'
patch:
labels:
- 'fix'
- 'bug'
- 'style'
- 'docs'
- 'documentation'
- 'chore'
default: patch
sort-by: title
template: |
## Changes
$CHANGES
30 changes: 30 additions & 0 deletions .github/workflows/ci-master-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,33 @@ jobs:
repository: ${{ vars.REGISTRY_SOURCE }}/${{ matrix.GAME }}
short-description: ${{ matrix.GAME_FULLNAME }} (${{ matrix.ENGINE }}) 🐳
readme-filepath: docs/image/readme/${{ matrix.ENGINE }}-${{ matrix.GAME }}.md

update-draft-release:
needs:
- test-build-hlds
- test-build-srcds
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
with:
config-name: release-drafter.yml
publish: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish-draft-release:
needs:
- test-build-hlds
- test-build-srcds
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
with:
config-name: release-drafter.yml
publish: true
name: ${{ github.ref_name }} # E.g. 'master' or 'v1.2.3'
tag: ${{ github.ref_name }} # E.g. 'master' or 'v1.2.3'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 5e38f71

Please sign in to comment.