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
32 changes: 32 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
changelog:
categories:
- title: 🎉 New Features
labels:
- new feature
- title: ✨ Enhancements
labels:
- enhancement
- title: 🛠 Breaking Changes
labels:
- breaking change
- title: 🐛 Bug fixes
labels:
- bug
- title: ⚡️ Optimisations
labels:
- optimisation
- title: 🔭 Observability
labels:
- observability
- title: 🔒️ Security
labels:
- security
- title: 📝 Documentation
labels:
- documentation
- title: 📦️ Dependencies
labels:
- dependencies
- title: Other Changes
labels:
- '*'
16 changes: 16 additions & 0 deletions .github/workflows/push-trunk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Push Trunk Workflow
on:
push:
branches:
- "main"

jobs:
update-candidate:
name: Update Release Candidate Notes
permissions:
id-token: write
contents: write
secrets: inherit
uses: ./.github/workflows/reusable-update-release-candidate-notes.yml
with:
branch-with-candidate-code: main
51 changes: 51 additions & 0 deletions .github/workflows/reusable-create-release-notes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
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.
workflow_dispatch:
inputs:
tag:
required: true
type: string
description: Tag to be used as the latest release anchor point. Can be new or existing.

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

- 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

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Clear Candidate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
shell: bash
run: python3 release_manager.py candidate clear
47 changes: 47 additions & 0 deletions .github/workflows/reusable-update-release-candidate-notes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Update Release Candidate Notes
on:
workflow_call:
inputs:
branch-with-candidate-code:
type: string
workflow_dispatch:
inputs:
branch-with-candidate-code:
description: Which branch would you like to create the release candidate from?
type: string

jobs:
update:
name: Update Candidate Release Notes
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Git
run: |
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"

- name: Fetch latest commit from ${{ inputs.branch-with-candidate-code }}
id: fetch-master
run: |
git fetch origin ${{ inputs.branch-with-candidate-code }}
echo "LATEST_CANDIDATE_COMMIT=$(git rev-parse origin/${{ inputs.branch-with-candidate-code }})" >> $GITHUB_OUTPUT

- name: Sync release-candidate tag
shell: bash
run: |
git tag -fa release-candidate origin/${{ inputs.branch-with-candidate-code }} -m "Update release-candidate tag"
git push origin refs/tags/release-candidate --force

- name: Update release candidate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
shell: bash
run: python3 release_manager.py candidate update
49 changes: 49 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Simple Release Notes

A drop-in github action to generate release notes.


## Setup

### `changelog` via `release.yml`

Create a `.github/release.yml`

This will define the categorial structure of the release notes. When a pull request label matches an entry in the `release.yml`, it will be placed under the respective section. It matched against the first label to have an entry in the `categories` section.

Sample `release.yml`

``` yaml
changelog:
categories:
- title: 🎉 New Features
labels:
- new feature
- title: ✨ Enhancements
labels:
- enhancement
- title: 🛠 Breaking Changes
labels:
- breaking change
- title: 🐛 Bug fixes
labels:
- bug
- title: ⚡️ Optimisations
labels:
- optimisation
- title: 🔭 Observability
labels:
- observability
- title: 🔒️ Security
labels:
- security
- title: 📝 Documentation
labels:
- documentation
- title: 📦️ Dependencies
labels:
- dependencies
- title: Other Changes
labels:
- '*'
```
Loading