Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBX-105: Added automatic release creation on tag push #19

Merged
merged 1 commit into from
Apr 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Automatic Changelog Generator for tag

on:
push:
tags:
- 'v*'
- '!v*-alpha*'
- '!v*-beta*'
- '!v*-rc*'

jobs:
release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Set Environment
run: |
echo "BUILD_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV

- name: Get previous release tag based on type
id: prevrelease
uses: ibexa/version-logic-action@master
with:
currentTag: ${{ env.BUILD_TAG }}

- name: Generate changelog
id: changelog
uses: ibexa/changelog-generator-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
currentTag: ${{ env.BUILD_TAG }}
previousTag: ${{ steps.prevrelease.outputs.previousTag }}

- name: Print the changelog
run: echo "${{ steps.changelog.outputs.changelog }}"

- name: Create Release
id: create_release
uses: zendesk/action-create-release@v1
with:
tag_name: ${{ env.BUILD_TAG }}
body: |
${{ steps.changelog.outputs.changelog }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}