From e3ca3100148ce23f85f62f8ae2c3e83805f1ac55 Mon Sep 17 00:00:00 2001 From: Andrew Cutler Date: Tue, 16 Sep 2025 16:28:39 +1000 Subject: [PATCH] Replace workflows with latest --- .github/workflows/github-release.yml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 74ecfe4..60a259b 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -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<> "$GITHUB_OUTPUT" - name: Create Release id: create_release @@ -43,5 +42,5 @@ jobs: ${{ steps.get_release_notes.outputs.notes }} - draft: true + draft: false prerelease: false