Skip to content

Commit aea3453

Browse files
Philipp Dorschnerlazyfrosch
authored andcommitted
git init
0 parents  commit aea3453

26 files changed

+2768
-0
lines changed

.github/workflows/build.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Go
2+
on:
3+
push:
4+
branches: [ main ]
5+
tags:
6+
- v*
7+
pull_request:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Check out code into the Go module directory
15+
uses: actions/checkout@v1
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Set up Go
20+
uses: actions/setup-go@v2
21+
with:
22+
go-version: 1.16
23+
24+
- name: Test
25+
run: go test -v ./...
26+
27+
- name: Build
28+
run: go build -v .
29+
30+
- name: Run goreleaser in snapshot mode
31+
if: success() && ! startsWith(github.ref, 'refs/tags/v')
32+
uses: goreleaser/goreleaser-action@v2
33+
with:
34+
version: latest
35+
args: release --rm-dist --snapshot
36+
37+
- name: Upload assets for snapshots
38+
if: success() && ! startsWith(github.ref, 'refs/tags/v')
39+
uses: actions/upload-artifact@v2
40+
with:
41+
name: check_cloud_gcp
42+
path: dist/*
43+
44+
- name: Run goreleaser in release mode
45+
if: success() && startsWith(github.ref, 'refs/tags/v')
46+
uses: goreleaser/goreleaser-action@v2
47+
with:
48+
version: latest
49+
args: release --rm-dist
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: golangci-lint
2+
on:
3+
push:
4+
tags:
5+
- v*
6+
branches:
7+
- main
8+
pull_request:
9+
10+
jobs:
11+
golangci:
12+
name: lint
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: golangci-lint
18+
uses: golangci/golangci-lint-action@v2

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.idea/
2+
/dist/
3+
gcp*
4+
check_cloud_gcp*

.golangci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
run:
2+
deadline: 1m
3+
4+
linters:
5+
disable-all: false
6+
enable:
7+
- funlen
8+
- dogsled
9+
- dupl
10+
# - lll
11+
- whitespace
12+
- wsl
13+
presets:
14+
- bugs
15+
- unused
16+
# - style
17+
fast: false

.goreleaser.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# See documentation at https://goreleaser.com
2+
before:
3+
hooks:
4+
- go mod download
5+
builds:
6+
- env:
7+
- CGO_ENABLED=0
8+
goarch:
9+
- amd64
10+
goos:
11+
- linux
12+
- windows
13+
- darwin
14+
ldflags:
15+
- >-
16+
-s -w -X main.version={{.Version}}
17+
-X main.commit={{.Commit}}
18+
-X main.date={{.CommitDate}}
19+
release:
20+
github:
21+
owner: NETWAYS
22+
name: check_cloud_gcp
23+
archives:
24+
- format: binary
25+
replacements:
26+
darwin: Darwin
27+
linux: Linux
28+
windows: Windows
29+
amd64: x86_64
30+
checksum:
31+
name_template: 'checksums.txt'
32+
snapshot:
33+
name_template: '{{ .Tag }}-SNAPSHOT-{{.ShortCommit}}'
34+
changelog:
35+
sort: asc
36+
filters:
37+
exclude:
38+
- '^docs:'
39+
- '^test:'

0 commit comments

Comments
 (0)