From 5689eedffbfe0a8a79c9537f7b582723f048d4f5 Mon Sep 17 00:00:00 2001 From: CuteReimu <415551921@qq.com> Date: Sun, 7 Apr 2024 11:36:56 +0800 Subject: [PATCH] Update Github Action --- .github/workflows/{build-v2.yml => build-v1.yml} | 11 +++++++---- .github/workflows/gofmt.yml | 8 ++++---- README.md | 2 -- 3 files changed, 11 insertions(+), 10 deletions(-) rename .github/workflows/{build-v2.yml => build-v1.yml} (73%) diff --git a/.github/workflows/build-v2.yml b/.github/workflows/build-v1.yml similarity index 73% rename from .github/workflows/build-v2.yml rename to .github/workflows/build-v1.yml index 877ee0e..97ba40c 100644 --- a/.github/workflows/build-v2.yml +++ b/.github/workflows/build-v1.yml @@ -1,14 +1,17 @@ -name: Go-v2 +name: Go-v1 on: push: - branches: [ v2 ] + branches: [ v1 ] pull_request: - branches: [ v2 ] + branches: [ v1 ] jobs: build: + strategy: + matrix: + go: [ '1.17', '1.22' ] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -16,7 +19,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: '1.22' + go-version: ${{ matrix.go }} - name: golangci-lint uses: golangci/golangci-lint-action@v4 diff --git a/.github/workflows/gofmt.yml b/.github/workflows/gofmt.yml index 8cff0e6..fdbda61 100644 --- a/.github/workflows/gofmt.yml +++ b/.github/workflows/gofmt.yml @@ -2,7 +2,9 @@ name: GoFmt on: push: - branches: [ master, v2 ] + branches: [ v1 ] + pull_request: + branches: [ master ] jobs: @@ -17,8 +19,6 @@ jobs: go-version: '1.22' - name: gofmt - if: github.repository_owner == 'CuteReimu' - continue-on-error: true run: | if [ "$(gofmt -s -l -w . | wc -l)" -gt 0 ]; then git config --local user.name 'github-actions[bot]' @@ -26,4 +26,4 @@ jobs: git add --all git commit -m "gofmt" git push - fi \ No newline at end of file + fi diff --git a/README.md b/README.md index e76f1a3..d8f5ae6 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,6 @@ 本项目是基于Go语言编写的哔哩哔哩API调用。目前常用的接口已经基本完成,具体进度可以看[这里](#进度) -[v2版本正在施工中。。。](https://github.com/CuteReimu/bilibili/issues/31) - **声明**: 1. 本项目遵守 AGPL 开源协议。