From 17df1b6eb9787804a9980280edfaae5ab6a5da2a Mon Sep 17 00:00:00 2001 From: Lasse Nielsen Date: Sat, 21 Feb 2026 14:48:18 +0100 Subject: [PATCH 1/3] ci: combine release-please and packager into single workflow --- .github/workflows/release-please.yml | 16 ---------------- .github/workflows/release.yml | 24 +++++++++++++++++++----- 2 files changed, 19 insertions(+), 21 deletions(-) delete mode 100644 .github/workflows/release-please.yml diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml deleted file mode 100644 index a2f7401..0000000 --- a/.github/workflows/release-please.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Release Please - -on: - push: - branches: - - master - -permissions: - contents: write - pull-requests: write - -jobs: - release-please: - runs-on: ubuntu-latest - steps: - - uses: googleapis/release-please-action@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 46788ab..aa94978 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,24 +1,38 @@ -name: Package and Release +name: Release on: push: - tags: - - '[0-9]+.[0-9]+.[0-9]+' + branches: + - master + +permissions: + contents: write + pull-requests: write jobs: - release: + release-please: runs-on: ubuntu-latest + outputs: + release_created: ${{ steps.release.outputs.release_created }} + tag_name: ${{ steps.release.outputs.tag_name }} + steps: + - uses: googleapis/release-please-action@v4 + id: release + package: + needs: release-please + if: ${{ needs.release-please.outputs.release_created == 'true' }} + runs-on: ubuntu-latest env: CF_API_KEY: ${{ secrets.CF_API_KEY }} WOWI_API_TOKEN: ${{ secrets.WOWI_API_TOKEN }} WAGO_API_TOKEN: ${{ secrets.WAGO_API_TOKEN }} GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }} - steps: - name: Clone project uses: actions/checkout@v4 with: + ref: ${{ needs.release-please.outputs.tag_name }} fetch-depth: 0 - name: Package and release From bf9cd6721648dcc3629997e47119ab3055b00777 Mon Sep 17 00:00:00 2001 From: Lasse Nielsen Date: Sat, 21 Feb 2026 14:48:28 +0100 Subject: [PATCH 2/3] docs: update AGENTS.md for combined workflow --- AGENTS.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 62530d8..913886e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -36,8 +36,7 @@ RaidLogAuto/ ├── .pkgmeta # Packaging metadata ├── .github/workflows/ │ ├── lint.yml # Luacheck CI on PRs and master -│ ├── release.yml # Auto-packaging on tag push -│ └── release-please.yml # Automated versioning and changelog +│ └── release.yml # Release-please + auto-packaging ``` ### Version-Specific Files From 877ee26715b72061382cde7d8db2a9c82b4397c3 Mon Sep 17 00:00:00 2001 From: Lasse Nielsen Date: Sun, 22 Feb 2026 17:23:40 +0100 Subject: [PATCH 3/3] ci: fix release workflow --- .github/workflows/release.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d806e41..2c5ee4e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -57,7 +57,7 @@ jobs: if: >- always() && github.event_name != 'pull_request' && - (github.ref_type == 'tag' || github.event_name == 'workflow_dispatch') + (startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch') runs-on: ubuntu-latest outputs: tag: ${{ steps.vars.outputs.tag }} @@ -72,10 +72,16 @@ jobs: shell: bash run: | TAG="" - if [ "${{ github.ref_type }}" = "tag" ]; then - TAG="${{ github.ref_name }}" + if [ -n "${{ needs.create-tag.outputs.tag }}" ]; then + TAG="${{ needs.create-tag.outputs.tag }}" elif [ "${{ github.event_name }}" = "workflow_dispatch" ]; then TAG="${{ github.event.inputs.tag_name }}" + else + TAG="${{ github.ref_name }}" + fi + if [ -z "$TAG" ]; then + echo "::error::No tag could be resolved" + exit 1 fi echo "tag=$TAG" >> "$GITHUB_OUTPUT" @@ -95,12 +101,10 @@ jobs: git switch "$BRANCH" git config user.name 'github-actions[bot]' git config user.email 'github-actions[bot]@users.noreply.github.com' - git add CHANGELOG.md if git diff --cached --quiet; then exit 0 fi - git commit -m "Update changelog" git push origin "HEAD:$BRANCH" @@ -110,7 +114,7 @@ jobs: if: >- always() && ( needs.create-tag.result == 'success' || - github.ref_type == 'tag' || + startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' ) runs-on: ubuntu-latest @@ -126,10 +130,10 @@ jobs: TAG="" if [ -n "${{ needs.create-tag.outputs.tag }}" ]; then TAG="${{ needs.create-tag.outputs.tag }}" - elif [ "${{ github.ref_type }}" = "tag" ]; then - TAG="${{ github.ref_name }}" elif [ "${{ github.event_name }}" = "workflow_dispatch" ]; then TAG="${{ github.event.inputs.tag_name }}" + else + TAG="${{ github.ref_name }}" fi if [ -z "$TAG" ]; then echo "::error::No tag could be resolved" @@ -146,4 +150,4 @@ jobs: - name: Package and upload uses: BigWigsMods/packager@v2 env: - GITHUB_REF: refs/tags/${{ env.TAG_NAME }} + GITHUB_REF: refs/tags/${{ env.TAG_NAME }} \ No newline at end of file