From 5f0afba9d3432f944cba38287949f4478e8447d0 Mon Sep 17 00:00:00 2001 From: Lew Goettner Date: Thu, 8 Apr 2021 11:35:33 -0400 Subject: [PATCH] Switch to Main / Pull New Tag for Versioning --- .github/workflows/tag.yml | 84 ++++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 41 deletions(-) diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 7b3262b..4839bdf 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -2,48 +2,50 @@ name: Tag, Release and Upload on: push: branches: - - master + - main jobs: Release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* - - name: Bump version and push tag - id: tag_release - uses: anothrNick/github-tag-action@1.17.2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DEFAULT_BUMP: patch - - name: Create Release - id: create_release - uses: actions/create-release@latest - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ steps.tag_release.outputs.tag }} - release_name: Release ${{ steps.tag_release.outputs.tag }} - body: GitHub Actions Release - draft: false - prerelease: false - - name: Set up Go 1.14 - uses: actions/setup-go@v1 - with: - go-version: 1.16 - id: go - - name: Check out code into the Go module directory - uses: actions/checkout@v2 - - name: Deps & Build - shell: bash - run: | - export PATH=${PATH}:`go env GOPATH`/bin - make build-deps - make build - - name: Upload binaries to release - uses: svenstaro/upload-release-action@v1-release - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: buildenv-* - tag: ${{ steps.tag_release.outputs.tag }} - overwrite: true - file_glob: true + - uses: actions/checkout@v2 + - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* + - name: Bump version and push tag + id: tag_release + uses: anothrNick/github-tag-action@1.17.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DEFAULT_BUMP: patch + - name: Create Release + id: create_release + uses: actions/create-release@latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ steps.tag_release.outputs.tag }} + release_name: Release ${{ steps.tag_release.outputs.tag }} + body: GitHub Actions Release + draft: false + prerelease: false + - name: Set up Go 1.16 + uses: actions/setup-go@v1 + with: + go-version: 1.16 + id: go + - name: Check out new tag into the Go module directory + uses: actions/checkout@v2 + with: + ref: ${{ steps.tag_release.outputs.tag }} + - name: Deps & Build + shell: bash + run: | + export PATH=${PATH}:`go env GOPATH`/bin + make build-deps + make build + - name: Upload binaries to release + uses: svenstaro/upload-release-action@v1-release + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: buildenv-* + tag: ${{ steps.tag_release.outputs.tag }} + overwrite: true + file_glob: true