From d63b62ce2727add2b31e8dcfc028f9523aa49d58 Mon Sep 17 00:00:00 2001 From: liweiyi88 Date: Sun, 29 Jan 2023 21:05:27 +1100 Subject: [PATCH] update workflow dir --- .github/release.yaml | 33 ------------------------------ .github/tests.yaml | 48 -------------------------------------------- 2 files changed, 81 deletions(-) delete mode 100644 .github/release.yaml delete mode 100644 .github/tests.yaml diff --git a/.github/release.yaml b/.github/release.yaml deleted file mode 100644 index 69ee227..0000000 --- a/.github/release.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: goreleaser - -on: - push: - tags: - - '*' - -permissions: - contents: write - packages: write - issues: write - -jobs: - goreleaser: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - uses: docker/setup-qemu-action@v1 - - uses: docker/setup-buildx-action@v1 - - run: git fetch --force --tags - - uses: actions/setup-go@v3 - with: - go-version: '>=1.19.5' - cache: true - - uses: goreleaser/goreleaser-action@v4 - with: - distribution: goreleaser - version: latest - args: release --rm-dist - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/tests.yaml b/.github/tests.yaml deleted file mode 100644 index 8c1eb86..0000000 --- a/.github/tests.yaml +++ /dev/null @@ -1,48 +0,0 @@ -name: tests -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - - workflow_dispatch: -jobs: - test: - strategy: - matrix: - go-version: [1.18, 1.19] - os: [ubuntu-latest, windows-latest] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/setup-go@v3 - with: - go-version: ${{ matrix.go-version }} - - uses: actions/checkout@v3 - - run: | - go test -v -cover ./... -coverprofile coverage.out -coverpkg ./... - - name: Go Coverage Badge - uses: tj-actions/coverage-badge-go@v1 - if: ${{ runner.os == 'ubuntu-latest' && matrix.go == '1.19' }} - with: - green: 80 - filename: coverage.out - - - uses: stefanzweifel/git-auto-commit-action@v4 - id: auto-commit-action - with: - commit_message: Apply Code Coverage Badge - skip_fetch: true - skip_checkout: true - file_pattern: ./README.md - - - name: Push Changes - if: steps.auto-commit-action.outputs.changes_detected == 'true' - uses: ad-m/github-push-action@master - with: - github_token: ${{ github.token }} - branch: ${{ github.ref }} - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - files: ./coverage.out \ No newline at end of file