switch to actions #16

Merged
techknowlogick merged 1 commits from actions into main 2023-04-20 15:37:18 +00:00
4 changed files with 81 additions and 71 deletions

@ -1,71 +0,0 @@
---
kind: pipeline
type: docker
name: compliance
platform:
os: linux
arch: amd64
trigger:
event:
- pull_request
steps:
- name: check
pull: always
image: golang:1.18
environment:
GOPROXY: https://goproxy.io
commands:
- go test -race -v ./...
- name: build
pull: always
image: goreleaser/goreleaser
environment:
GOPROXY: https://goproxy.io
commands:
- goreleaser build --snapshot
---
kind: pipeline
type: docker
name: build-main
platform:
os: linux
arch: amd64
trigger:
branch:
- main
event:
- push
steps:
- name: build
pull: always
image: goreleaser/goreleaser
environment:
GOPROXY: https://goproxy.io
commands:
- goreleaser build --snapshot
---
kind: pipeline
type: docker
name: release
platform:
os: linux
arch: amd64
trigger:
event:
- tag
steps:
- name: fetch
image: alpine/git
commands:
- git fetch --tags
- name: release
pull: always
image: goreleaser/goreleaser
environment:
GOPROXY: https://goproxy.io
GITEA_TOKEN:
from_secret: gitea_token
commands:
- goreleaser release

@ -0,0 +1,27 @@
name: build nightly
on:
push:
branches:
- main
jobs:
lint:
name: build nightly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git fetch --force --tags
- name: setup go
uses: https://github.com/actions/setup-go@v4
with:
go-version: '>=1.20.1'
- name: goreleaser
uses: https://github.com/goreleaser/goreleaser-action@v4
with:
version: latest
args: release
env:
GOPROXY: https://goproxy.io,direct

@ -0,0 +1,27 @@
name: build and release
on:
push:
tags:
- '*'
jobs:
lint:
name: build and release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git fetch --force --tags
- name: setup go
uses: https://github.com/actions/setup-go@v4
with:
go-version: '>=1.20.1'
- name: goreleaser
uses: https://github.com/goreleaser/goreleaser-action@v4
with:
version: latest
args: build --snapshot
env:
GOPROXY: https://goproxy.io,direct

@ -0,0 +1,27 @@
name: build and test
on:
- pull_request
jobs:
lint:
name: build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: setup go
uses: https://github.com/actions/setup-go@v4
with:
go-version: '>=1.20.1'
- name: Build
env:
GOPROXY: https://goproxy.io,direct
run: |
go test -race -v ./...
- name: goreleaser
uses: https://github.com/goreleaser/goreleaser-action@v4
with:
version: latest
args: build --snapshot
env:
GOPROXY: https://goproxy.io,direct