51 lines
1.1 KiB
YAML
51 lines
1.1 KiB
YAML
|
name: release-main
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
tags:
|
||
|
- "*"
|
||
|
|
||
|
env:
|
||
|
GOPATH: /go_path
|
||
|
GOCACHE: /go_cache
|
||
|
|
||
|
jobs:
|
||
|
release-image:
|
||
|
runs-on: ubuntu-latest
|
||
|
container:
|
||
|
image: catthehacker/ubuntu:act-20.04
|
||
|
steps:
|
||
|
- name: Checkout
|
||
|
uses: actions/checkout@v4
|
||
|
with:
|
||
|
fetch-depth: 0 # all history for all branches and tags
|
||
|
|
||
|
- uses: actions/setup-go@v5
|
||
|
with:
|
||
|
go-version: "^1"
|
||
|
- uses: https://gitea.com/actions/go-hashfiles@v0.0.1
|
||
|
id: hash-go
|
||
|
with:
|
||
|
patterns: |
|
||
|
go.mod
|
||
|
go.sum
|
||
|
- name: cache go
|
||
|
id: cache-go
|
||
|
uses: actions/cache@v4
|
||
|
with:
|
||
|
path: |
|
||
|
/go_path
|
||
|
/go_cache
|
||
|
key: go_path-${{ steps.hash-go.outputs.hash }
|
||
|
|
||
|
- name: Run GoReleaser
|
||
|
uses: goreleaser/goreleaser-action@v5
|
||
|
with:
|
||
|
# either 'goreleaser' (default) or 'goreleaser-pro'
|
||
|
distribution: goreleaser
|
||
|
version: latest
|
||
|
args: release --clean
|
||
|
env:
|
||
|
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
|
GORELEASER_FORCE_TOKEN: "gitea"
|