diff --git a/.github/workflows/build-test-tag.yml b/.github/workflows/release.yml similarity index 59% rename from .github/workflows/build-test-tag.yml rename to .github/workflows/release.yml index 79377d8..20fc7f0 100644 --- a/.github/workflows/build-test-tag.yml +++ b/.github/workflows/release.yml @@ -27,10 +27,24 @@ jobs: - name: Test run: sudo go test -v -cover ./... - - name: Bump version and push tag + - id: bump + name: Bump version and push tag uses: anothrNick/github-tag-action@1.36.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} WITH_V: true RELEASE_BRANCHES: main + - name: build and package + run: bash ./package_release.sh + + - uses: "marvinpinto/action-automatic-releases@v1.2.1" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + prerelease: false + title: ${{ steps.bump.outputs.new_tag }} + files: | + LICENSE + ./artifacts/*.zip + ./artifacts/*.tar.gz + diff --git a/.github/workflows/tagged-release.yml b/.github/workflows/tagged-release.yml deleted file mode 100644 index 7bff5cf..0000000 --- a/.github/workflows/tagged-release.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: tagged-release - -on: - push: - tags: - - "v*" - -env: - go-version: 1.17 - -jobs: - build_and_test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: ${{ env.go-version }} - - - name: Build - run: go build -v ./... - - - name: Test - run: sudo go test -v -cover ./... - - release: - runs-on: ubuntu-latest - needs: [build_and_test] - steps: - - uses: actions/checkout@v2 - - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: ${{ env.go-version }} - - - name: build and package - run: bash ./package_release.sh - - - uses: "marvinpinto/action-automatic-releases@v1.2.1" - with: - repo_token: "${{ secrets.GITHUB_TOKEN }}" - prerelease: false - files: | - LICENSE - ./artifacts/*.zip - ./artifacts/*.tar.gz diff --git a/.github/workflows/ci.yml b/.github/workflows/test.yml similarity index 100% rename from .github/workflows/ci.yml rename to .github/workflows/test.yml