Skip to content

Commit

Permalink
feat(workflows): 测试流水线
Browse files Browse the repository at this point in the history
  • Loading branch information
BadKid90s committed Jan 23, 2024
1 parent bf76423 commit 96c0d6c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 13 deletions.
33 changes: 20 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,32 @@
name: Release
#on:
# create:
# tags:
# - v*
on:
create:
tags:
- v*
# pull_request:
push:

permissions:
contents: write

jobs:
release:
name: Release on GitHub
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4

- name: Validates GO releaser config
uses: docker://goreleaser/goreleaser:latest
with:
args: check
- name: Set up Go
uses: actions/setup-go@v4

- name: Create release on GitHub
uses: docker://goreleaser/goreleaser:latest
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
args: release
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 6 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
before:
hooks:
- go mod tidy
builds:
-
main: './cmd/main'
File renamed without changes.

0 comments on commit 96c0d6c

Please sign in to comment.