From 0218465a508bb1bfb832d0a501705261371fe3d2 Mon Sep 17 00:00:00 2001 From: Trevor Nederlof Date: Tue, 21 Mar 2023 13:35:17 +0000 Subject: [PATCH] Streamline actions and use GITHUB_TOKEN --- .github/workflows/build-test-release.yml | 16 ++++++++++---- .github/workflows/bump-version.yml | 27 ------------------------ 2 files changed, 12 insertions(+), 31 deletions(-) delete mode 100644 .github/workflows/bump-version.yml diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index a1a3c8c..48ac10a 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -1,9 +1,11 @@ name: Build, Test and Release on: - push: - tags: - - '*' + pull_request: + types: + - closed + branches: + - main permissions: contents: write @@ -26,6 +28,12 @@ jobs: run: go build -v ./... # - name: Test # run: go test -v ./... + - name: Bump version and push tag + uses: anothrNick/github-tag-action@1.59.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + WITH_V: true + DEFAULT_BUMP: patch goreleaser: needs: code-check @@ -45,5 +53,5 @@ jobs: version: latest args: release --clean env: - GITHUB_TOKEN: ${{ secrets.ACTIONS_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} FURY_TOKEN: ${{ secrets.FURY_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml deleted file mode 100644 index 2804c0f..0000000 --- a/.github/workflows/bump-version.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Bump Tag Version - -on: - pull_request: - types: - - closed - branches: - - main - -permissions: - contents: write - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ github.sha }} - fetch-depth: '0' - - - name: Bump version and push tag - uses: anothrNick/github-tag-action@1.59.0 - env: - GITHUB_TOKEN: ${{ secrets.ACTIONS_TOKEN }} - WITH_V: true - DEFAULT_BUMP: patch \ No newline at end of file