File tree Expand file tree Collapse file tree 3 files changed +43
-27
lines changed Expand file tree Collapse file tree 3 files changed +43
-27
lines changed Original file line number Diff line number Diff line change 1+ name : Go
2+
3+ on :
4+ - push
5+
6+ jobs :
7+ go-test :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - name : Checkout
11+ uses : actions/checkout@v2
12+ - name : Set up Go
13+ uses : actions/setup-go@v2
14+ with :
15+ go-version : 1.15
16+ - run : go get -d -t ./...
17+ - run : go test -i ./...
18+ - run : go test -race -v ./...
19+
20+ goreleaser :
21+ runs-on : ubuntu-latest
22+ needs : go-test
23+ if : startsWith(github.ref, 'refs/tags/v')
24+ steps :
25+ - name : Checkout
26+ uses : actions/checkout@v2
27+ with :
28+ fetch-depth : 0
29+ - name : Set up Go
30+ uses : actions/setup-go@v2
31+ with :
32+ go-version : 1.15
33+ - run : echo "${DOCKER_PASSWORD}" | docker login -u=sourcegraphci --password-stdin
34+ env :
35+ DOCKER_PASSWORD : ${{ secrets.DOCKER_PASSWORD }}
36+ - name : Run GoReleaser
37+ uses : goreleaser/goreleaser-action@v2
38+ with :
39+ version : latest
40+ args : release --rm-dist
41+ env :
42+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ if ! echo "$VERSION" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$'; then
77 exit 1
88fi
99
10+ # Push a new tag, this will trigger the goreleaser workflow in .github/workflows/go-ci.yml
1011git tag " ${VERSION} " -a -m " release v${VERSION} "
1112git tag latest -f -a -m " release v${VERSION} "
1213git push -f --tags
You can’t perform that action at this time.
0 commit comments