Skip to content

Commit

Permalink
Add goreleaser config file
Browse files Browse the repository at this point in the history
  • Loading branch information
LinuxSuRen committed Jun 9, 2022
1 parent b704800 commit 0fcc2b0
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 2 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Release

on:
push:
tags:
- '*'

jobs:
goreleaser:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3.0.0
- name: Unshallow
run: git fetch --prune --unshallow
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2.9.1
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GH_PUBLISH_SECRETS }}
32 changes: 32 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
binary: atest
dir: cmd
goos:
- linux
- windows
- darwin
archives:
- name_template: "{{ .Binary }}-{{ .Os }}-{{ .Arch }}"
format_overrides:
- goos: windows
format: zip
files:
- README.md
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'API testing'
description: 'API testing'
name: 'API testing with Kubernetes'
description: 'API testing with Kubernetes'
inputs:
pattern:
description: 'The pattern of the items'
Expand Down

0 comments on commit 0fcc2b0

Please sign in to comment.