From a66d9b171a95ac28ebc38e98d9bec4b4ea68a587 Mon Sep 17 00:00:00 2001 From: Diogo Tridapalli Date: Thu, 22 Jan 2026 00:32:11 -0300 Subject: [PATCH 1/4] Use buildCommand for proper VERSION file tracking Switch from prebuildCommand to buildCommand with explicit inputFiles and outputFiles. This ensures the build system tracks VERSION as a dependency and automatically regenerates GeneratedVersion.swift when it changes, without requiring `swift package clean`. Co-Authored-By: Claude Opus 4.5 --- Plugins/BuildVersionPlugin/plugin.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Plugins/BuildVersionPlugin/plugin.swift b/Plugins/BuildVersionPlugin/plugin.swift index c995912..2ad50ba 100644 --- a/Plugins/BuildVersionPlugin/plugin.swift +++ b/Plugins/BuildVersionPlugin/plugin.swift @@ -8,7 +8,7 @@ struct BuildVersionPlugin: BuildToolPlugin { let outputFile = context.pluginWorkDirectoryURL.appending(path: "GeneratedVersion.swift") return [ - .prebuildCommand( + .buildCommand( displayName: "Generate version from VERSION file", executable: URL(fileURLWithPath: "/bin/bash"), arguments: [ @@ -23,7 +23,8 @@ struct BuildVersionPlugin: BuildToolPlugin { EOF """ ], - outputFilesDirectory: context.pluginWorkDirectoryURL + inputFiles: [versionFile], + outputFiles: [outputFile] ) ] } From a4a6bb3b151a2628866c52925484cbce412d2919 Mon Sep 17 00:00:00 2001 From: Diogo Tridapalli Date: Thu, 22 Jan 2026 00:46:18 -0300 Subject: [PATCH 2/4] Add concurrency and SPM caching to workflows - Add concurrency groups to cancel in-progress runs when new commits arrive - Add Swift package caching using .build directory keyed on Package.swift Co-Authored-By: Claude Opus 4.5 --- .github/workflows/ci.yml | 12 ++++++++++++ .github/workflows/release.yml | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0e388bc..d625573 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,10 @@ on: branches: - main +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build-and-test: name: Build and Test @@ -15,6 +19,14 @@ jobs: with: fetch-depth: 0 + - name: Cache Swift packages + uses: actions/cache@v4 + with: + path: .build + key: spm-${{ runner.os }}-${{ hashFiles('Package.swift') }} + restore-keys: | + spm-${{ runner.os }}- + - name: Build run: swift build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 29d4912..11604ed 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,6 +3,10 @@ name: Release on: workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: release: name: Build and Release @@ -15,6 +19,14 @@ jobs: with: fetch-depth: 0 + - name: Cache Swift packages + uses: actions/cache@v4 + with: + path: .build + key: spm-${{ runner.os }}-${{ hashFiles('Package.swift') }} + restore-keys: | + spm-${{ runner.os }}- + - name: Validate version id: version uses: ./.github/actions/validate-version From 88c6abfc86446bcaf9286c9bf53bc1aaff8d0e13 Mon Sep 17 00:00:00 2001 From: Diogo Tridapalli Date: Thu, 22 Jan 2026 00:51:46 -0300 Subject: [PATCH 3/4] Generate release notes from commits since last tag Co-Authored-By: Claude Opus 4.5 --- .github/workflows/release.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 11604ed..14b5077 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,10 +36,20 @@ jobs: - name: Build release binary run: swift build -c release + - name: Generate release notes + run: | + PREV_TAG=$(git tag --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+' | head -n1) + if [ -z "$PREV_TAG" ]; then + git log --pretty=format:"- %s" HEAD > release-notes.txt + else + git log --pretty=format:"- %s" ${PREV_TAG}..HEAD > release-notes.txt + fi + - name: Create release uses: diogot/gh-actions-workflows/actions/create-release@main with: tag: v${{ steps.version.outputs.version }} title: v${{ steps.version.outputs.version }} + body-file: release-notes.txt files: .build/release/swift-outdated token: ${{ secrets.GITHUB_TOKEN }} From 25c76f744c24467b4747a0205e4a6f938a2f8900 Mon Sep 17 00:00:00 2001 From: Diogo Tridapalli Date: Thu, 22 Jan 2026 00:52:56 -0300 Subject: [PATCH 4/4] Bump version to 1.0.2 Co-Authored-By: Claude Opus 4.5 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 7dea76e..6d7de6e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.1 +1.0.2