From 6325bc5387dc0a0deafae1eeb7908b8447f50d51 Mon Sep 17 00:00:00 2001 From: 52funny <52funny@52funnydeMac-Pro.local> Date: Thu, 1 Aug 2024 16:11:16 +0800 Subject: [PATCH] feat: add github ci --- .github/workflows/goreleaser.yml | 27 +++++++++++++++++++++++++++ .goreleaser.yaml | 4 +++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/goreleaser.yml diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml new file mode 100644 index 0000000..418893f --- /dev/null +++ b/.github/workflows/goreleaser.yml @@ -0,0 +1,27 @@ +name: goreleaser + +on: + push: + tags: + - "v*" + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v5 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.TOKEN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 4094b76..a5a8e38 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -6,7 +6,7 @@ # yaml-language-server: $schema=https://goreleaser.com/static/schema.json # vim: set ts=2 sw=2 tw=0 fo=cnqoj -version: 1 +version: 2 before: hooks: @@ -37,6 +37,8 @@ archives: format_overrides: - goos: windows format: zip + files: + - config_example.yml changelog: sort: asc