Skip to content

Create Release Notes #3

Create Release Notes

Create Release Notes #3

name: Create Release Notes
on:
workflow_call:
inputs:
tag:
required: true
type: string
description: Tag to be used as the latest release anchor point. Can be new or existing.
auto-clear-release-candidate-notes:
type: boolean
default: true
description: Disable this to prevent the auto management of release candidate notes
workflow_dispatch:
inputs:
tag:
required: true
type: string
description: Tag to be used as the latest release anchor point. Can be new or existing.
auto-clear-release-candidate-notes:
type: boolean
default: true
description: Disable this to prevent the auto management of release candidate notes
jobs:
create-release:
name: Create Release Notes
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- name: Check out code
uses: actions/checkout@v4
# We forcefully clone to retrieve the release_manager.py, so that it is available in consuming repositories
- name: Check out code
uses: actions/checkout@v4
with:
repository: "danielebra/simple-release-notes"
path: simple-release-notes
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
shell: bash
run: python3 release_manager.py release ${{ inputs.tag }}
clear-candidate:
name: Clear Release Candidate
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
if: ${{ inputs.auto-clear-release-candidate-notes == true }}
steps:
- name: Check out code
uses: actions/checkout@v4
# We forcefully clone to retrieve the release_manager.py, so that it is available in consuming repositories
- name: Check out code
uses: actions/checkout@v4
with:
repository: "danielebra/simple-release-notes"
path: simple-release-notes
- name: Clear Candidate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
shell: bash
run: python3 release_manager.py candidate clear