Skip to content

Commit f70cd01

Browse files
Prereleaser fixes (#521)
* fix releaser * only run on V2 tagging * do it right
1 parent 62c9bcd commit f70cd01

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

.github/workflows/release-binaries.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build Release Binaries
22

33
on:
44
release:
5-
types: [published, prereleased]
5+
types: [published]
66
workflow_dispatch:
77
inputs:
88
tag:
@@ -16,6 +16,7 @@ permissions:
1616
jobs:
1717
goreleaser:
1818
name: Build Cross-Platform Binaries
19+
if: startsWith(github.event.release.tag_name, '3.')
1920
runs-on: ubuntu-latest
2021
steps:
2122
- name: Determine tag
@@ -69,9 +70,10 @@ jobs:
6970
with:
7071
distribution: goreleaser
7172
version: latest
72-
args: release --clean
73+
args: release --clean --skip=validate
7374
env:
7475
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
76+
GORELEASER_CURRENT_TAG: ${{ steps.tag.outputs.tag }}
7577

7678
- name: Upload release artifacts
7779
if: steps.check_assets.outputs.skip_build == 'false'

.github/workflows/release.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ on:
77

88
jobs:
99
# Update Homebrew formula (macOS/Linux)
10+
# Only runs for 2.x.x releases (master branch)
1011
homebrew:
1112
name: Update Homebrew
12-
if: github.repository_owner == 'go-nv'
13+
if: github.repository_owner == 'go-nv' && startsWith(github.event.release.tag_name, '2.')
1314
strategy:
1415
matrix:
1516
os: ["ubuntu-latest"]
@@ -18,18 +19,18 @@ jobs:
1819
- uses: actions/checkout@v5
1920
with:
2021
token: ${{ secrets.GH_TOKEN }}
21-
22+
2223
- name: Set up Go
2324
uses: actions/setup-go@v5
2425
with:
2526
go-version: "stable"
26-
27+
2728
- name: Build goenv
2829
run: make build
29-
30+
3031
- name: Add goenv to PATH
3132
run: echo "${GITHUB_WORKSPACE}" >> $GITHUB_PATH
32-
33+
3334
- name: Create Homebrew PR
3435
uses: dawidd6/action-homebrew-bump-formula@v5
3536
with:

0 commit comments

Comments
 (0)