mirror of
https://github.com/araddon/dateparse.git
synced 2024-11-14 19:39:15 +08:00
40 lines
1.3 KiB
YAML
40 lines
1.3 KiB
YAML
|
name: releaser
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
tags:
|
||
|
- 'v*.*.*'
|
||
|
|
||
|
jobs:
|
||
|
goreleaser:
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- name: Checkout
|
||
|
uses: actions/checkout@v2
|
||
|
with:
|
||
|
fetch-depth: 0
|
||
|
- name: Set up Go
|
||
|
uses: actions/setup-go@v2
|
||
|
with:
|
||
|
go-version: 1.19
|
||
|
- name: Cache-Go
|
||
|
uses: actions/cache@v1
|
||
|
with:
|
||
|
path: |
|
||
|
~/go/pkg/mod # Module download cache
|
||
|
~/.cache/go-build # Build cache (Linux)
|
||
|
~/Library/Caches/go-build # Build cache (Mac)
|
||
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||
|
restore-keys: |
|
||
|
${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||
|
- name: Test
|
||
|
run: go test ./...
|
||
|
- name: Run GoReleaser
|
||
|
uses: goreleaser/goreleaser-action@v2
|
||
|
with:
|
||
|
distribution: goreleaser
|
||
|
version: latest
|
||
|
args: release --rm-dist
|
||
|
env:
|
||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|