Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: goreleaser

on:
push:
tags:
- "v*"

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --parallelism 1 --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ config.toml
# build
pb
bin/
dist/

# OS Files
.DS_Store
50 changes: 50 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
env:
- GO111MODULE=on
- CGO_ENABLED=0

builds:
- binary: pb
id: pb
main: ./main.go
goos:
- windows
- darwin
- linux
goarch:
- amd64
- arm64
flags:
- -trimpath
- -tags=kqueue
ldflags:
- -s -w -X main.Version={{ .Version }} -X main.Commit={{ .ShortCommit }}

archives:
- format: tar.gz
rlcp: true
files:
- README.md
- LICENSE

dockers:
- id: pb
goos: linux
goarch: amd64
ids:
- pb
image_templates:
- "parseablehq/pb:{{ .Tag }}"
- "parseablehq/pb:latest"
skip_push: false
dockerfile: Dockerfile
use: docker
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title=Parseable"
- "--label=maintainer=Parseable Team <[email protected]>"
- "--label=org.opencontainers.image.vendor=Cloudnatively Pvt Ltd"
- "--label=org.opencontainers.image.licenses=AGPL-3.0"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--platform=linux/amd64"
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM ubuntu:22.04
RUN apt-get -y update && apt install -y ca-certificates
WORKDIR /app
COPY pb .
ENTRYPOINT [ "./pb" ]