chore(ci): use gitea actions instead of droneCI

This commit is contained in:
DataHearth 2023-03-31 18:59:19 +02:00
parent 8a4932aa72
commit d444de44f1
No known key found for this signature in database
GPG Key ID: E88FD356ACC5F3C4
3 changed files with 52 additions and 29 deletions

View File

@ -1,29 +0,0 @@
name: default
kind: pipeline
type: docker
steps:
- name: fetch tags
image: alpine/git
commands:
- git fetch --tags
when:
event:
- tag
- name: build
image: golang:1.17-alpine
commands:
- go build -v ./...
- name: release
image: goreleaser/goreleaser
environment:
GITEA_TOKEN:
from_secret: GITEA_TOKEN
commands:
- go install github.com/git-chglog/git-chglog/cmd/git-chglog@latest
- goreleaser release --clean --release-notes <(git-chglog -t .chglog/RELEASE_CHANGELOG.tpl.md)
when:
event:
- tag

View File

@ -0,0 +1,18 @@
name: build
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.17
- name: Build
run: go build -v ./...

View File

@ -0,0 +1,34 @@
name: release
on:
push:
tags:
- "*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetch tags
run: git fetch --force --tags
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.17
- name: Build
run: go build -v ./...
- name: Release
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
run: |
go install github.com/goreleaser/goreleaser@latest
go install github.com/git-chglog/git-chglog/cmd/git-chglog@latest
goreleaser release --clean --release-notes <(git-chglog -t .chglog/RELEASE_CHANGELOG.tpl.md)