mirror of
https://github.com/araddon/dateparse.git
synced 2024-11-10 11:51:54 +08:00
Added go releaser
This commit is contained in:
parent
eabb56b497
commit
c5b562ac1a
39
.github/workflows/releaser.yml
vendored
Normal file
39
.github/workflows/releaser.yml
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
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 }}
|
38
.goreleaser.yml
Normal file
38
.goreleaser.yml
Normal file
@ -0,0 +1,38 @@
|
||||
project_name: dateparse
|
||||
builds:
|
||||
-
|
||||
id: "dateparse"
|
||||
binary: "dateparse"
|
||||
dir: dateparse
|
||||
-
|
||||
id: "example"
|
||||
binary: "example"
|
||||
dir: example
|
||||
archives:
|
||||
-
|
||||
format_overrides:
|
||||
- goos: windows
|
||||
format: zip
|
||||
checksum:
|
||||
name_template: 'checksums.txt'
|
||||
snapshot:
|
||||
name_template: "{{ .Tag }}-next"
|
||||
changelog:
|
||||
sort: asc
|
||||
filters:
|
||||
exclude:
|
||||
- '^docs:'
|
||||
- '^test:'
|
||||
nfpms:
|
||||
-
|
||||
vendor: dateparse
|
||||
homepage: https://github.com/araddon/dateparse
|
||||
maintainer: n/a <someone@eample.com>
|
||||
description: NA
|
||||
formats:
|
||||
- apk
|
||||
- deb
|
||||
- rpm
|
||||
release: 1
|
||||
section: default
|
||||
priority: extra
|
Loading…
Reference in New Issue
Block a user