Skip to content
This repository was archived by the owner on Jun 5, 2024. It is now read-only.

Commit 5cdb675

Browse files
authored
update github releases on pull request(#19)
Co-authored-by: Wanjohi <[email protected]>
1 parent a355ddc commit 5cdb675

File tree

4 files changed

+94
-0
lines changed

4 files changed

+94
-0
lines changed

.github/release-drafter.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name-template: 'v$RESOLVED_VERSION'
2+
tag-template: 'v$RESOLVED_VERSION'
3+
template: |
4+
# What's Changed
5+
6+
$CHANGES
7+
8+
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
9+
categories:
10+
- title: '⚠ Breaking Changes'
11+
label: 'type: breaking'
12+
- title: '🚀New Features'
13+
label: 'type: feature'
14+
- title: '🐜 Bug Fixes'
15+
label: 'type: bug'
16+
- title: '🧰 Maintenance'
17+
label: 'type: maintenance'
18+
- title: '📖 Documentation'
19+
label: 'type: docs'
20+
- title: 'Other changes'
21+
- title: '⬆ Version Upgrades'
22+
label: 'type: dependencies'
23+
collapse-after: 10
24+
25+
version-resolver:
26+
major:
27+
labels:
28+
- 'type: breaking'
29+
minor:
30+
labels:
31+
- 'type: feature'
32+
patch:
33+
labels:
34+
- 'type: bug'
35+
- 'type: maintenance'
36+
- 'type: docs'
37+
- 'type: dependencies'
38+
- 'type: security'
39+
40+
exclude-labels:
41+
- 'skip-changelog'

.github/workflows/draft.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
update_release_draft:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: release-drafter/release-drafter@master
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GH_RELEASES }}

.github/workflows/release.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Release
2+
on:
3+
push:
4+
tags:
5+
- v*.*.*
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v3
13+
with:
14+
fetch-depth: 0
15+
16+
- name: version
17+
id: version
18+
run: |
19+
tag=${GITHUB_REF/refs\/tags\//}
20+
version=${tag#v}
21+
major=${version%%.*}
22+
echo "tag=${tag}" >> $GITHUB_OUTPUT
23+
echo "version=${version}" >> $GITHUB_OUTPUT
24+
echo "major=${major}" >> $GITHUB_OUTPUT
25+
26+
- uses: release-drafter/release-drafter@master
27+
with:
28+
version: ${{ steps.version.outputs.version }}
29+
publish: true
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GH_RELEASES }}
32+
33+
- name: force update major tag
34+
run: |
35+
git tag v${{ steps.version.outputs.major }} ${{ steps.version.outputs.tag }} -f
36+
git push origin refs/tags/v${{ steps.version.outputs.major }} -f

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,8 @@ node_modules
3535
dist
3636
bin
3737

38+
#not on this branch
39+
internal
40+
3841
# Environment files
3942
*.env

0 commit comments

Comments
 (0)