From 33fa03da76679d1dd88992472cd27497f52aeb12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gast=C3=B3n=20Fournier?= Date: Thu, 16 Jan 2025 13:24:26 +0100 Subject: [PATCH] chore: when releasing from main via GHA (#102) --- .github/workflows/create-release.yml | 5 +++++ .github/workflows/release.yml | 7 ++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 85a49f7..a75528b 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -39,3 +39,8 @@ jobs: if: github.event.inputs.release == 'patch' - run: ./gradlew release -Prelease.versionIncrementer=incrementPrerelease -Prelease.versionIncrementer.initialPreReleaseIfNotOnPrerelease=-rc1 -Prelease.ignoreChanges=true if: github.event.inputs.release == 'pre-release' + + publish-release: + needs: create-tag + uses: ./.github/workflows/release.yaml + secrets: inherit diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 634f4ca..f442e18 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,18 +1,15 @@ name: Publish SDK on: + # either if we push a tag manually or if it's called from create-release workflow push: tags: - 'v*' - workflow_run: - workflows: ["Create a new release tag"] - types: - - completed + workflow_call: jobs: deploy-release: runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags') steps: - uses: actions/checkout@v4 name: Checkout code