Skip to content

Commit

Permalink
cleanup: fixes for release (#157)
Browse files Browse the repository at this point in the history
* Fixes for release

* Stop deleting the maxmind files

* Better Go setup

* Use Go 1.20
  • Loading branch information
fortuna authored Jun 8, 2023
1 parent 337f866 commit 989add5
Show file tree
Hide file tree
Showing 5 changed files with 1,234 additions and 411 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,16 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.19
uses: actions/setup-go@v2
with:
go-version: ^1.19
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: '${{ github.workspace }}/go.mod'

- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
# Download GeoIP test data from MaxMind
git submodule update --init
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ project_name: outline-ss-server
# Skip 32 bit macOS builds.
builds:
-
main: ./cmd/outline-ss-server/main.go
main: ./cmd/outline-ss-server
env:
- CGO_ENABLED=0
goos:
Expand Down
9 changes: 3 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
BUILDDIR=$(CURDIR)/dist
GORELEASER=go run github.com/goreleaser/goreleaser

.PHONY: release release-local test clean clean-all
.PHONY: release release-local test clean

# This requires GITHUB_TOKEN to be set.
release: clean-all
release: clean
$(GORELEASER)

release-local:
$(GORELEASER) --rm-dist --snapshot
$(GORELEASER) --clean --snapshot

test: third_party/maxmind/test-data/GeoIP2-Country-Test.mmdb
go test -v -race -benchmem -bench=. ./... -benchtime=100ms
Expand All @@ -23,6 +23,3 @@ go.mod: tools.go
clean:
rm -rf $(BUILDDIR)
go clean

clean-all: clean
rm -rf $(CURDIR)/third_party/maxmind/*
Loading

0 comments on commit 989add5

Please sign in to comment.