Skip to content
Merged
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
21 changes: 10 additions & 11 deletions .github/workflows/github-release.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,33 @@
# Source: https://github.com/panubo/reference-github-actions/blob/main/github-release.yml
# Description: Create a GitHub release
# LICENSE: MIT License, Copyright (c) 2021-2022 Volt Grid Pty Ltd t/a Panubo
# LICENSE: MIT License, Copyright (c) 2021-2025 Volt Grid Pty Ltd t/a Panubo

name: GitHub Release

on:
push:
tags:
- 'v*'
- "v*"
workflow_call:

permissions:
contents: write

jobs:
build:
name: Create GitHub Release
runs-on: ubuntu-latest
steps:

- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0
fetch-depth: 0 # Required for git log to work

- name: Get Release Notes
id: get_release_notes
run: |
NOTES=$(git log --pretty=format:%s $(git tag --sort=-v:refname | head -1)...$(git tag --sort=-v:refname | head -2 | tail -1) | awk '{ print "-", $0 }')
NOTES="${NOTES//'%'/'%25'}"
NOTES="${NOTES//$'\n'/'%0A'}"
NOTES="${NOTES//$'\r'/'%0D'}"
echo "NOTES: ${NOTES}"
echo "::set-output name=notes::${NOTES}"
printf "notes<<EOF\\n%s\\nEOF\\n" "${NOTES}" >> "$GITHUB_OUTPUT"

- name: Create Release
id: create_release
Expand All @@ -43,5 +42,5 @@ jobs:

${{ steps.get_release_notes.outputs.notes }}

draft: true
draft: false
prerelease: false