Skip to content

Commit 9e2c19c

Browse files
committed
fix: use HTTPS token auth for private Go modules in CI
1 parent 96632fd commit 9e2c19c

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release
33
on:
44
push:
55
tags:
6-
- v*
6+
- "v*"
77

88
permissions:
99
contents: write
@@ -18,12 +18,18 @@ jobs:
1818

1919
- uses: actions/setup-go@v5
2020
with:
21-
go-version: stable
21+
go-version-file: go.mod
22+
cache: true
2223

23-
- uses: goreleaser/goreleaser-action@v6
24+
- name: Configure Go private modules
25+
run: git config --global url."https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/"
26+
27+
- name: Run GoReleaser
28+
uses: goreleaser/goreleaser-action@v7
2429
with:
25-
distribution: goreleaser
26-
version: latest
30+
version: "~> v2"
2731
args: release --clean
2832
env:
2933
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
GOPRIVATE: github.com/GoCodeAlone/*
35+
GONOSUMCHECK: github.com/GoCodeAlone/*

0 commit comments

Comments
 (0)