File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Release
12on :
2- create :
3+ push :
4+ branches :
5+ - " !*"
36 tags :
4- - v*
5- name : Packman Release
7+ - " v*.*"
68jobs :
7- release-linux-amd64 :
8- name : release linux/amd64
9+ build :
910 runs-on : ubuntu-latest
11+ name : goreleaser
1012 steps :
11- - uses : actions/checkout@master
12- - name : compile and release
13- uses : ngs/go-release.action@v1.0.1
13+ - name : Set up Go 1.13
14+ uses : actions/setup-go@v1
15+ with :
16+ go-version : 1.13
17+ id : go
18+ - name : Check out code into the Go module directory
19+ uses : actions/checkout@v1
20+ - name : Check GITHUB_REF environment variable value
21+ run : echo $GITHUB_REF
22+ - name : Release via goreleaser
23+ uses : goreleaser/goreleaser-action@master
24+ with :
25+ args : release
1426 env :
15- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
16- GOARCH : amd64
17- GOOS : linux
27+ GITHUB_TOKEN : ${{ secrets.CUSTOM_GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ GOBUILD=$(GOCMD) build
55GOTEST =$(GOCMD ) test
66GOINSTALL =$(GOCMD ) install
77
8+ PLATFORMS =darwin linux windows
9+ ARCHITECTURES =386 amd64
10+
811build : test
912 $(GOBUILD ) -o packman -v main.go
1013run :
1316 $(GOTEST ) -v ./...
1417
1518install : build
16- $(GOINSTALL ) -v .
19+ $(GOINSTALL ) -v .
20+
21+ release : test
22+ $(foreach GOOS, $(PLATFORMS ) ,\
23+ $(foreach GOARCH, $(ARCHITECTURES), $(shell export GOOS=$(GOOS); export GOARCH=$(GOARCH); go build -v -o packman-$(GOOS)-$(GOARCH))))
You can’t perform that action at this time.
0 commit comments