Skip to content

Commit ee27f5e

Browse files
committed
Don't use goreleaser action
Can't see any reason to use the action if we're going to add a Makefile target anyway.
1 parent 339baaf commit ee27f5e

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

.github/workflows/publish-cli.yaml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ on:
44
push:
55
tags:
66
- cli/v*
7-
release:
8-
types:
9-
- published
107

118
permissions:
129
contents: write
@@ -21,18 +18,12 @@ jobs:
2118
uses: actions/setup-go@v5
2219
- name: Set VERSION
2320
run: |
24-
TAG="${{ github.event.inputs.version || github.ref_name }}"
25-
# Get rid of the tag since the cli/ prefix confuses goreleaser.
26-
git tag -d $TAG
2721
echo VERSION=${TAG#cli/v} >> $GITHUB_ENV
28-
- name: Run GoReleaser
29-
uses: goreleaser/goreleaser-action@v6
30-
with:
31-
distribution: goreleaser
32-
version: '~> v2'
33-
args: release --clean --snapshot --verbose
3422
env:
35-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
TAG: ${{ github.ref_name }}
24+
- name: Build release artifacts
25+
run: |
26+
make release-cli
3627
- name: Upload assets
3728
uses: actions/upload-artifact@v4
3829
with:

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ minimal: $(VENV) assets settings.py install-hooks
88
cli/cli: cli/main.go go.mod
99
cd cli && go build -o cli
1010

11+
.PHONY: release-cli
12+
release-cli: export GORELEASER_CURRENT_TAG ?= 0.0.0
13+
release-cli: export VERSION ?= 0.0.0
14+
release-cli:
15+
go run github.com/goreleaser/goreleaser/v2@latest release --clean --snapshot --verbose
16+
rm -v dist/*.txt dist/*.yaml dist/*.json
17+
1118
$(VENV): setup.py requirements.txt requirements-dev.txt cli/cli
1219
rm -rf $@
1320
virtualenv -ppython3.11 $@

0 commit comments

Comments
 (0)