2023-07-24 11:25:24 +00:00
|
|
|
run-name: ${{ github.actor }} is testing
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- '*'
|
|
|
|
jobs:
|
|
|
|
Release:
|
|
|
|
runs-on: docker
|
|
|
|
#container:
|
|
|
|
# image: goreleaser/goreleaser
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
#- run: goreleaser release --skip-publish --snapshot --rm-dist --debug
|
|
|
|
- name: Setup Go environment
|
|
|
|
uses: https://github.com/actions/setup-go@v2.1.3
|
|
|
|
with:
|
|
|
|
go-version: 1.20
|
|
|
|
- name: Run Tests
|
2023-07-24 11:29:34 +00:00
|
|
|
run: go test ./...
|
2023-07-24 11:25:24 +00:00
|
|
|
- name: Run GoReleaser
|
|
|
|
uses: https://github.com/goreleaser/goreleaser-action@v4
|
|
|
|
with:
|
|
|
|
# either 'goreleaser' (default) or 'goreleaser-pro'
|
|
|
|
distribution: goreleaser
|
|
|
|
version: latest
|
|
|
|
args: release --clean
|
|
|
|
env:
|
|
|
|
GORELEASER_FORCE_TOKEN: "gitea"
|
|
|
|
GITEA_TOKEN: "${{ secrets.GITEA }}"
|
|
|
|
|