From e1eb3a06c8dd5ac9dd997256393b29f1e114c6d7 Mon Sep 17 00:00:00 2001 From: wileyj <2847772+wileyj@users.noreply.github.com> Date: Mon, 25 Mar 2024 10:10:10 -0700 Subject: [PATCH] create release of any branch if a tag is provided --- .github/workflows/ci.yml | 4 +--- .github/workflows/create-source-binary.yml | 5 +---- .github/workflows/github-release.yml | 10 +++------- .github/workflows/image-build-binary.yml | 3 +-- 4 files changed, 6 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 434c977a56..93201a1534 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,11 +89,9 @@ jobs: ## ## Runs when the following is true: ## - tag is provided - ## - workflow is building default branch (master) create-release: if: | - inputs.tag != '' && - github.ref == format('refs/heads/{0}', github.event.repository.default_branch) + inputs.tag != '' name: Create Release needs: - rustfmt diff --git a/.github/workflows/create-source-binary.yml b/.github/workflows/create-source-binary.yml index ad4f259169..385b30af7d 100644 --- a/.github/workflows/create-source-binary.yml +++ b/.github/workflows/create-source-binary.yml @@ -21,11 +21,9 @@ concurrency: jobs: ## Runs when the following is true: ## - tag is provided - ## - workflow is building default branch (master) artifact: if: | - inputs.tag != '' && - github.ref == format('refs/heads/{0}', github.event.repository.default_branch) + inputs.tag != '' name: Build Binaries runs-on: ubuntu-latest strategy: @@ -60,4 +58,3 @@ jobs: arch: ${{ matrix.arch }} cpu: ${{ matrix.cpu }} tag: ${{ inputs.tag }} - diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index afa2769095..0b0b183329 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -25,11 +25,9 @@ jobs: ## ## Runs when the following is true: ## - tag is provided - ## - workflow is building default branch (master) build-binaries: if: | - inputs.tag != '' && - github.ref == format('refs/heads/{0}', github.event.repository.default_branch) + inputs.tag != '' name: Build Binaries uses: ./.github/workflows/create-source-binary.yml with: @@ -41,8 +39,7 @@ jobs: ## - workflow is building default branch (master) create-release: if: | - inputs.tag != '' && - github.ref == format('refs/heads/{0}', github.event.repository.default_branch) + inputs.tag != '' name: Create Release runs-on: ubuntu-latest needs: @@ -84,8 +81,7 @@ jobs: ## - workflow is building default branch (master) docker-image: if: | - inputs.tag != '' && - github.ref == format('refs/heads/{0}', github.event.repository.default_branch) + inputs.tag != '' name: Docker Image (Binary) uses: ./.github/workflows/image-build-binary.yml needs: diff --git a/.github/workflows/image-build-binary.yml b/.github/workflows/image-build-binary.yml index b804ae3be6..74415e7f16 100644 --- a/.github/workflows/image-build-binary.yml +++ b/.github/workflows/image-build-binary.yml @@ -28,8 +28,7 @@ jobs: ## - workflow is building default branch (master) image: if: | - inputs.tag != '' && - github.ref == format('refs/heads/{0}', github.event.repository.default_branch) + inputs.tag != '' name: Build Image runs-on: ubuntu-latest strategy: