Skip to content

Commit 014ac3f

Browse files
authored
IBX-105: Added automatic release creation on tag push (#288)
1 parent de278c8 commit 014ac3f

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/release.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Automatic Changelog Generator for tag
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
- '!v*-alpha*'
8+
- '!v*-beta*'
9+
- '!v*-rc*'
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@master
17+
- name: Set Environment
18+
run: |
19+
echo "BUILD_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
20+
21+
- name: Get previous release tag based on type
22+
id: prevrelease
23+
uses: ibexa/version-logic-action@master
24+
with:
25+
currentTag: ${{ env.BUILD_TAG }}
26+
27+
- name: Generate changelog
28+
id: changelog
29+
uses: ibexa/changelog-generator-action@master
30+
with:
31+
github_token: ${{ secrets.GITHUB_TOKEN }}
32+
currentTag: ${{ env.BUILD_TAG }}
33+
previousTag: ${{ steps.prevrelease.outputs.previousTag }}
34+
35+
- name: Print the changelog
36+
run: echo "${{ steps.changelog.outputs.changelog }}"
37+
38+
- name: Create Release
39+
id: create_release
40+
uses: zendesk/action-create-release@v1
41+
with:
42+
tag_name: ${{ env.BUILD_TAG }}
43+
body: |
44+
${{ steps.changelog.outputs.changelog }}
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)