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
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Test pbuf-cli
name: Build and Test pbuf

on:
push:
Expand All @@ -22,12 +22,12 @@ jobs:
- name: Setup Go Environment
uses: actions/setup-go@v3
with:
go-version: 1.21.x
go-version: 1.25.x

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v9
with:
version: v1.54
version: v2.7

- name: Build Go
run: CGO_ENABLED=0 GOOS=linux make build
Expand All @@ -37,7 +37,7 @@ jobs:

- name: Run pbuf vendor in Docker and Verify Files
run: |
docker run --rm -v $(pwd)/vendor:/tmp/vendor -w /tmp/vendor pbuf-cli sh -c "cp /app/pbuf.yaml /tmp/vendor && /app/pbuf-cli vendor"
docker run --rm -v $(pwd)/vendor:/tmp/vendor -w /tmp/vendor pbuf sh -c "cp /app/pbuf.yaml /tmp/vendor && /app/pbuf vendor"
if [ ! -f ./vendor/proto/addressbook.proto ]; then
echo "Address book proto file from main branch is not found"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup Go Environment
uses: actions/setup-go@v3
with:
go-version: 1.21.x
go-version: 1.25.x

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
Expand Down
52 changes: 52 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
version: 2

before:
hooks:
- go mod tidy

builds:
- id: pbuf
binary: pbuf
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
ldflags:
- -s -w

archives:
- id: pbuf
format: tar.gz
name_template: "pbuf_{{ .Version }}_{{ .Os }}_{{ .arch }}"
format_overrides:
- goos: windows
format: zip
files:
- LICENSE
- README.md

checksum:
name_template: "checksums.txt"

snapshot:
name_template: "{{ incpatch .Version }}-next"

changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
- "^ci:"

release:
github:
owner: pbufio
name: pbuf-cli
extra_files:
- glob: ./install.sh
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM bash:alpine3.16
FROM bash:alpine3.23

WORKDIR /app

COPY ./e2e/pbuf.yaml /app
COPY ./bin/pbuf-cli /app/pbuf-cli
COPY ./bin/pbuf /app/pbuf

CMD ["/app/pbuf-cli"]
CMD ["/app/pbuf"]
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: vendor
# vendor modules
vendor:
pbuf-cli vendor
pbuf vendor

.PHONY: vendor-gen
# gen modules
Expand All @@ -16,7 +16,7 @@ vendor-all:
.PHONY: build
# build
build:
mkdir -p bin/ && go build -o ./bin/pbuf-cli .
mkdir -p bin/ && go build -o ./bin/pbuf .

.PHONY: build-in-docker
# build in docker
Expand All @@ -32,7 +32,7 @@ build-in-docker:
.PHONY: docker
# docker
docker:
docker build -t pbuf-cli:latest .
docker build -t pbuf:latest .

.PHONY: lint
# lint
Expand Down
Loading
Loading