Skip to content

Commit

Permalink
Prepare CI
Browse files Browse the repository at this point in the history
  • Loading branch information
salyh committed Jul 6, 2024
1 parent dde5743 commit 81ebd0e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 23 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.59
- name: make
run:
make
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: '~> v6'
args: build --clean --verbose
#args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}



1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
bin/
dist/
8 changes: 1 addition & 7 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@ version: 2

before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
# you may remove this if you don't need go generate
- go generate ./...
- gofmt -w -e .

builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin

archives:
Expand All @@ -28,10 +26,6 @@ archives:
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
format_overrides:
- goos: windows
format: zip
changelog:
sort: asc
Expand Down
14 changes: 2 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
BINDIR := $(CURDIR)/bin

all: build

deps:
go mod download
go mod tidy

format:
gofmt -w -e .

build: deps format
CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-w -s" -o '$(BINDIR)'/go-aes-gcm ./
build:
goreleaser build --single-target --snapshot --clean

0 comments on commit 81ebd0e

Please sign in to comment.