-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from philips-labs/feature/make-release
Feature/make release
- Loading branch information
Showing
8 changed files
with
924 additions
and
5 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 |
---|---|---|
|
@@ -61,3 +61,30 @@ jobs: | |
name: codecov-umbrella | ||
yml: ./codecov.yml | ||
fail_ci_if_error: true | ||
|
||
release: | ||
name: release | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up Go 1.14 | ||
uses: actions/[email protected] | ||
with: | ||
go-version: 1.14 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Login to DockerHub Registry | ||
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin | ||
|
||
- name: Release | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
bin/ | ||
dist/ | ||
.env | ||
*.out | ||
github-project-matching.json |
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,72 @@ | ||
# This is an example goreleaser.yaml file with some sane defaults. | ||
# Make sure to check the documentation at http://goreleaser.com | ||
project_name: tabia | ||
|
||
before: | ||
hooks: | ||
- go mod download | ||
|
||
env: | ||
- CGO_ENABLED=0 | ||
|
||
builds: | ||
- id: binary | ||
dir: cmd/tabia | ||
goos: | ||
- windows | ||
- darwin | ||
- linux | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
goarm: | ||
- 8 | ||
ldflags: | ||
- -s -w -X main.version={{.Version}} | ||
|
||
archives: | ||
- id: archive | ||
format: tar.gz | ||
replacements: | ||
darwin: macOS | ||
files: | ||
- LICENSE* | ||
- README* | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
|
||
dockers: | ||
- goos: linux | ||
goarch: amd64 | ||
image_templates: | ||
- "philipssoftware/{{ .ProjectName }}:{{ .Tag }}" | ||
- "philipssoftware/{{ .ProjectName }}:v{{ .Major }}" | ||
- "philipssoftware/{{ .ProjectName }}:v{{ .Major }}.{{ .Minor }}" | ||
- "philipssoftware/{{ .ProjectName }}:latest" | ||
build_flag_templates: | ||
- "--pull" | ||
- "--label=com.opencontainers.image.created={{.Date}}" | ||
- "--label=org.opencontainers.image.title={{.ProjectName}}" | ||
- "--label=org.opencontainers.image.revision={{.FullCommit}}" | ||
- "--label=org.opencontainers.image.version={{.Version}}" | ||
- "--build-arg=VERSION={{.Version}}" | ||
extra_files: | ||
- "go.mod" | ||
- "go.sum" | ||
- "cmd" | ||
- "lib" | ||
checksum: | ||
name_template: 'checksums.txt' | ||
|
||
snapshot: | ||
name_template: "{{ .Tag }}-next" | ||
|
||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
- Merge pull request | ||
- Merge branch |
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,21 @@ | ||
FROM golang:1.14-alpine as builder | ||
RUN mkdir build | ||
WORKDIR /build | ||
COPY go.mod go.sum ./ | ||
RUN go mod download | ||
ARG VERSION=dev-docker | ||
COPY . . | ||
RUN CGO_ENABLED=0 go build -v -trimpath -ldflags "-X 'main.version=${VERSION}'" -o bin/tabia ./cmd/tabia | ||
|
||
FROM alpine | ||
LABEL maintainer="[email protected]" | ||
RUN mkdir /app | ||
WORKDIR /app | ||
VOLUME [ "/app" ] | ||
ENV TABIA_BITBUCKET_API=\ | ||
TABIA_BITBUCKET_USER=\ | ||
TABIA_BITBUCKET_TOKEN=\ | ||
TABIA_GITHUB_USER=\ | ||
TABIA_GITHUB_TOKEN= | ||
COPY --from=builder build/bin/tabia . | ||
ENTRYPOINT [ "/app/tabia" ] |
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
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
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 |
---|---|---|
|
@@ -3,5 +3,6 @@ | |
package main | ||
|
||
import ( | ||
_ "github.com/goreleaser/goreleaser" | ||
_ "golang.org/x/tools/cmd/stringer" | ||
) |