mirror of
https://github.com/yannh/kubeconform.git
synced 2026-02-19 09:57:02 +00:00
generate releases on tags as part of CI
This commit is contained in:
parent
24cdafa7b6
commit
f7bfd2c960
3 changed files with 24 additions and 6 deletions
20
.github/workflows/main.yml
vendored
20
.github/workflows/main.yml
vendored
|
|
@ -1,11 +1,8 @@
|
||||||
name: build
|
name: ci
|
||||||
|
|
||||||
on: push
|
on: push
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
@ -18,3 +15,16 @@ jobs:
|
||||||
|
|
||||||
- name: acceptance-test
|
- name: acceptance-test
|
||||||
run: make docker-acceptance
|
run: make docker-acceptance
|
||||||
|
|
||||||
|
goreleaser:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: test
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: goreleaser
|
||||||
|
run: make release
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
@ -1,10 +1,18 @@
|
||||||
builds:
|
builds:
|
||||||
- env:
|
- env:
|
||||||
- CGO_ENABLED=0
|
- CGO_ENABLED=0
|
||||||
|
- GOFLAGS = -mod=vendor
|
||||||
|
- GO111MODULE = on
|
||||||
goos:
|
goos:
|
||||||
- windows
|
- windows
|
||||||
- linux
|
- linux
|
||||||
- darwin
|
- darwin
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
- -tags=netgo
|
||||||
|
- -a
|
||||||
|
ldflags:
|
||||||
|
- -extldflags "-static"
|
||||||
archives:
|
archives:
|
||||||
- format: tar.gz
|
- format: tar.gz
|
||||||
format_overrides:
|
format_overrides:
|
||||||
|
|
|
||||||
2
Makefile
2
Makefile
|
|
@ -29,4 +29,4 @@ docker-acceptance: build-bats
|
||||||
docker run -t bats acceptance.bats
|
docker run -t bats acceptance.bats
|
||||||
|
|
||||||
release:
|
release:
|
||||||
goreleaser --rm-dist
|
docker run -e GITHUB_TOKEN -t -v $$PWD:/go/src/github.com/yannh/kubeconform -w /go/src/github.com/yannh/kubeconform goreleaser/goreleaser:v0.138 goreleaser release --rm-dist
|
||||||
Loading…
Reference in a new issue