This repository has been archived by the owner on Sep 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add CI releases with docker image (#57)
* add ci releases * fix version * add docker login and configure to run for realsies on tag pushes
- Loading branch information
Showing
3 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
- | ||
name: Unshallow | ||
run: git fetch --prune --unshallow | ||
- | ||
name: Set up Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.14.x | ||
- | ||
name: Docker login | ||
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin | ||
- | ||
name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v1 | ||
with: | ||
version: v0.131.1 | ||
args: release --rm-dist | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
project_name: lsif-go | ||
|
||
dist: release | ||
|
||
env: | ||
- GO111MODULE=on | ||
- CGO_ENABLED=0 | ||
|
||
before: | ||
hooks: | ||
- go mod download | ||
- go mod tidy | ||
|
||
builds: | ||
- | ||
main: ./cmd/lsif-go/ | ||
binary: lsif-go | ||
ldflags: | ||
- -X main.buildTag={{.Version}} | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
goarch: | ||
- amd64 | ||
|
||
archives: | ||
- id: tarball | ||
format: tar.gz | ||
- id: bin | ||
format: binary | ||
wrap_in_directory: false | ||
name_template: "src_{{ .Os }}_{{ .Arch }}" | ||
|
||
dockers: | ||
- binaries: | ||
- lsif-go | ||
image_templates: | ||
- "sourcegraph/lsif-go:{{ .Tag }}" | ||
- "sourcegraph/lsif-go:v{{ .Major }}" | ||
- "sourcegraph/lsif-go:v{{ .Major }}.{{ .Minor }}" | ||
- "sourcegraph/lsif-go:latest" | ||
|
||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM sourcegraph/alpine:3.10 | ||
|
||
COPY lsif-go /usr/bin/ | ||
ENTRYPOINT ["/usr/bin/lsif-go"] |