feat: add goreleaser

This commit is contained in:
Steven
2024-05-14 22:08:29 +08:00
parent 1dca2ffce0
commit f25cb7feba
8 changed files with 103 additions and 2 deletions

33
.github/workflows/build-artifacts.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: Build artifacts
on:
push:
tags:
- "*"
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: 1.22
check-latest: true
cache: true
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
# 'latest', 'nightly', or a semver
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

17
.github/workflows/stale.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
name: Close Stale Issues
on:
schedule:
- cron: "0 */8 * * *"
jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/stale@v9.0.0
with:
days-before-issue-stale: 14
days-before-issue-close: 7