2024-05-24 09:28:39 +02:00
|
|
|
name: 'Release changelog'
|
2021-01-26 11:53:02 +01:00
|
|
|
on:
|
2024-05-24 09:28:39 +02:00
|
|
|
workflow_call:
|
|
|
|
inputs:
|
|
|
|
version:
|
|
|
|
description: "Which version number should we use for the release"
|
|
|
|
type: 'string'
|
|
|
|
required: true
|
2021-01-26 11:53:02 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
2023-10-05 10:19:57 +02:00
|
|
|
uses: actions/checkout@v4
|
2021-01-26 11:53:02 +01:00
|
|
|
- name: Build changelog
|
|
|
|
id: github_release
|
2024-03-01 04:13:20 +01:00
|
|
|
uses: metcalfc/changelog-generator@v4.3.1
|
2021-01-26 11:53:02 +01:00
|
|
|
with:
|
|
|
|
myToken: ${{ secrets.GITHUB_TOKEN }}
|
2024-05-24 09:28:39 +02:00
|
|
|
base-ref: v${{ inputs.version }}
|
2021-01-26 11:53:02 +01:00
|
|
|
- name: Create release
|
2024-05-24 09:28:39 +02:00
|
|
|
uses: softprops/action-gh-release@v2
|
2021-01-26 11:53:02 +01:00
|
|
|
with:
|
2024-05-24 09:28:39 +02:00
|
|
|
tag_name: v${{ inputs.version }}
|
|
|
|
name: v${{ inputs.version }}
|
2022-09-09 08:51:56 +02:00
|
|
|
body: ${{ steps.github_release.outputs.changelog }}
|
2024-05-24 09:28:39 +02:00
|
|
|
prerelease: ${{ contains(inputs.version, 'beta') || contains(inputs.version, 'alpha') }}
|
2021-01-26 11:53:02 +01:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
|