2024-07-13 13:05:16 +02:00
|
|
|
name: Create Release
|
|
|
|
on:
|
|
|
|
workflow_call:
|
2024-07-13 13:20:05 +02:00
|
|
|
outputs:
|
|
|
|
release_name:
|
|
|
|
description: "Name of the created release"
|
|
|
|
value: ${{ jobs.create_release.outputs.release_name }}
|
2024-07-13 13:05:16 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
create_release:
|
|
|
|
name: Create Release
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
2024-07-13 13:20:05 +02:00
|
|
|
release_name: ${{ steps.tag_version.outputs.new_tag }}
|
2024-07-13 13:05:16 +02:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
2024-07-15 21:42:49 +02:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Changes Since Last Tag
|
|
|
|
id: changes
|
|
|
|
uses: jsmith/changes-since-last-tag@v0.4.1
|
2024-07-13 13:05:16 +02:00
|
|
|
|
|
|
|
- name: Bump version and push tag
|
2024-07-15 21:42:49 +02:00
|
|
|
if: steps.changes.outputs.any_changed == 'true'
|
2024-07-13 13:05:16 +02:00
|
|
|
id: tag_version
|
|
|
|
uses: mathieudutour/github-tag-action@v6.2
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
2024-07-15 21:42:49 +02:00
|
|
|
# default_bump: minor
|
|
|
|
default_bump: false
|
2024-07-13 13:05:16 +02:00
|
|
|
|
|
|
|
- name: Create a GitHub release
|
2024-07-15 21:42:49 +02:00
|
|
|
if: steps.changes.outputs.any_changed == 'true'
|
2024-07-13 13:05:16 +02:00
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
with:
|
|
|
|
tag: ${{ steps.tag_version.outputs.new_tag }}
|
|
|
|
name: ${{ steps.tag_version.outputs.new_tag }}
|
|
|
|
body: ${{ steps.tag_version.outputs.changelog }}
|
|
|
|
generateReleaseNotes: true
|