From da488f8e29a1e01201cd72dfcd389e1aced92354 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2026 17:45:19 +0000 Subject: [PATCH 1/3] Add release workflow to publish pre-built binaries Co-Authored-By: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com> --- .github/workflows/release.yml | 53 +++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..e9d574eb --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,53 @@ +name: Release + +on: + push: + tags: + - "v*" + +permissions: + contents: write + +jobs: + release: + name: Build and Release + runs-on: ubuntu-latest + steps: + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: "^1.20" + + - name: Check out code + uses: actions/checkout@v4 + + - name: Build binaries + run: | + VERSION=${GITHUB_REF_NAME} + BINARY=protoc-gen-openapi + MODULE=./cmd/protoc-gen-openapi + + platforms=( + "linux/amd64" + "linux/arm64" + "darwin/amd64" + "darwin/arm64" + "windows/amd64" + ) + + for platform in "${platforms[@]}"; do + GOOS="${platform%/*}" + GOARCH="${platform#*/}" + output="${BINARY}-${GOOS}-${GOARCH}" + if [ "$GOOS" = "windows" ]; then + output="${output}.exe" + fi + echo "Building ${output}..." + GOOS=$GOOS GOARCH=$GOARCH go build -trimpath -ldflags="-s -w" -o "dist/${output}" $MODULE + done + + - name: Create Release + uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true + files: dist/* From 8511eedc2af2a262c87c0a7831f6685815d0d565 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2026 17:47:51 +0000 Subject: [PATCH 2/3] Fix: swap checkout and setup-go order for cache compatibility Co-Authored-By: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com> --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e9d574eb..b62f7535 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,14 +13,14 @@ jobs: name: Build and Release runs-on: ubuntu-latest steps: + - name: Check out code + uses: actions/checkout@v4 + - name: Set up Go uses: actions/setup-go@v5 with: go-version: "^1.20" - - name: Check out code - uses: actions/checkout@v4 - - name: Build binaries run: | VERSION=${GITHUB_REF_NAME} From 7978beccd22c6b2cc4a67dd454e0bc0c5753bd7e Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2026 17:56:06 +0000 Subject: [PATCH 3/3] Add windows/arm64 to release platforms Co-Authored-By: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com> --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b62f7535..7265425c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,6 +33,7 @@ jobs: "darwin/amd64" "darwin/arm64" "windows/amd64" + "windows/arm64" ) for platform in "${platforms[@]}"; do