Skip to content

Commit

Permalink
v0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
spiritLHLS authored Jun 24, 2024
1 parent 069cd3a commit 32f3718
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI

on:
workflow_dispatch:

jobs:
test:
strategy:
matrix:
go: [ '1.22.x' ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Test
run: go test ./... -coverprofile=coverage.txt
- name: Create Tag
if: success() # 仅在测试成功时运行
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
TAG="v0.0.1-$(date +'%Y%m%d%H%M%S')"
git tag $TAG
git push origin $TAG
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 32f3718

Please sign in to comment.