From 9b6ddfa1dbfe13903be8ed08e7cb75c21eb16996 Mon Sep 17 00:00:00 2001 From: bradfordwagner Date: Fri, 15 Mar 2024 00:37:05 -0400 Subject: [PATCH] Branch Buids --- .github/workflows/go_releaser_branches.yml | 33 +++++++++++++++++++++ .github/workflows/go_releaser_tags.yml | 34 ++++++++++++++++++++++ .github/workflows/release.yaml | 29 ------------------ 3 files changed, 67 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/go_releaser_branches.yml create mode 100644 .github/workflows/go_releaser_tags.yml delete mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/go_releaser_branches.yml b/.github/workflows/go_releaser_branches.yml new file mode 100644 index 0000000..89efe1d --- /dev/null +++ b/.github/workflows/go_releaser_branches.yml @@ -0,0 +1,33 @@ +name: go_releaser_branches +on: + - push + - workflow_dispatch +jobs: + go-releaser-branches: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup go-task + uses: pnorton5432/setup-task@v1 + with: + task-version: 3.35.1 + - name: task version + run: task --version + - name: checkout taskfiles + uses: actions/checkout@v4 + with: + path: taskfiles + repository: bradfordwagner/taskfiles + - name: go=1.21 + uses: actions/setup-go@v5 + with: + go-version: 1.21 + - name: goreleaser=1.24.0 + uses: goreleaser/goreleaser-action@v5 + with: + version: 1.24.0 + install-only: true + - name: task=branches + run: task -t ./taskfiles/tasks/go_releaser.yml is_tag=false + env: + GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/go_releaser_tags.yml b/.github/workflows/go_releaser_tags.yml new file mode 100644 index 0000000..a38d183 --- /dev/null +++ b/.github/workflows/go_releaser_tags.yml @@ -0,0 +1,34 @@ +name: go_releaser_tags +on: + push: + tags: + - '*' +jobs: + go-releaser-tags: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup go-task + uses: pnorton5432/setup-task@v1 + with: + task-version: 3.35.1 + - name: task version + run: task --version + - name: checkout taskfiles + uses: actions/checkout@v4 + with: + path: taskfiles + repository: bradfordwagner/taskfiles + - name: go=1.21 + uses: actions/setup-go@v5 + with: + go-version: 1.21 + - name: goreleaser=1.24.0 + uses: goreleaser/goreleaser-action@v5 + with: + version: 1.24.0 + install-only: true + - name: task=tags + run: task -t ./taskfiles/tasks/go_releaser.yml is_tag=true + env: + GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml deleted file mode 100644 index 4c8d62f..0000000 --- a/.github/workflows/release.yaml +++ /dev/null @@ -1,29 +0,0 @@ ---- -name: release -on: - push: - tags: - - '*.*.*' -env: - # Golang version to use across CI steps - GOLANG_VERSION: '1.22' - -jobs: - goreleaser: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Setup Go - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GOLANG_VERSION }} - - name: GoReleaser - uses: goreleaser/goreleaser-action@v5 - with: - version: latest - args: release --clean - env: - GITHUB_TOKEN: ${{ github.token }}