Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -48,40 +48,3 @@ jobs:
tag: ${{ needs.release_commit_check.outputs.new_version }}
commit_sha: ${{ github.sha }}
github_token: ${{ secrets.GITHUB_TOKEN }}

draft_changelog:
runs-on: ubuntu-latest
needs: [add_version, release_commit_check]
outputs:
release_body: ${{ steps.git_cliff.outputs.content }}
steps:
- name: Checkout Repository at Tagged Commit
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ needs.release_commit_check.outputs.new_version }}
- name: Generate Changelog
id: git_cliff
uses: orhun/git-cliff-action@v4
with:
args: --latest --verbose
env:
GITHUB_REPO: ${{ github.repository }}

create_github_release:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
needs: [release_commit_check, draft_changelog]
steps:
- name: Create Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ${{ needs.release_commit_check.outputs.new_version }}
body: |
${{ needs.draft_changelog.outputs.release_body }}
draft: false
prerelease: false
58 changes: 58 additions & 0 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Create Release

on:
push:
tags: '\d+.\d+.\d+'

jobs:
on-main-branch-check:
runs-on: ubuntu-latest
outputs:
on_main: ${{ steps.contains_tag.outputs.retval }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: rickstaa/action-contains-tag@v1
id: contains_tag
with:
reference: "main"
tag: "${{ github.ref_name }}"

draft_changelog:
runs-on: ubuntu-latest
needs: on-main-branch-check
if: ${{ needs.on-main-branch-check.outputs.on_main == 'true' }}
outputs:
release_body: ${{ steps.git_cliff.outputs.content }}
steps:
- name: Checkout Repository at Tagged Commit
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref_name }}
- name: Generate Changelog
id: git_cliff
uses: orhun/git-cliff-action@v4
with:
args: --latest --verbose
env:
GITHUB_REPO: ${{ github.repository }}

create_github_release:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
needs: draft_changelog
steps:
- name: Create Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ${{ github.ref_name }}
body: |
${{ needs.draft_changelog.outputs.release_body }}
draft: false
prerelease: false
Loading