From e85df9954fdcf1000b1cff7b56b971b0626bdea6 Mon Sep 17 00:00:00 2001 From: Bart Louwers Date: Fri, 24 May 2024 22:38:42 +0200 Subject: [PATCH] Allow pre-releases from branches (#2431) --- .github/workflows/ios-ci.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ios-ci.yml b/.github/workflows/ios-ci.yml index 095438004..c868c30b7 100644 --- a/.github/workflows/ios-ci.yml +++ b/.github/workflows/ios-ci.yml @@ -11,6 +11,10 @@ on: - pre - no description: Whether to make a release, choose full release (uses platform/ios/VERSION) or pre-release + pre_release_version: + type: string + default: '' + description: Version (only for pre-releases) push: branches: - main @@ -204,7 +208,7 @@ jobs: ios-release: runs-on: macos-14 needs: ios-build - if: github.ref == 'refs/heads/main' + if: github.ref == 'refs/heads/main' || github.event.inputs.release == 'pre' defaults: run: working-directory: platform/ios @@ -251,7 +255,11 @@ jobs: - name: Get version (pre-release) if: github.event.inputs.release == 'pre' run: | - echo version="$(head VERSION)"-pre${{ github.sha }} >> "$GITHUB_ENV" + version="${{ github.event.inputs.pre_release_version }}" + if [[ -z "$version" ]]; then + version="$(head VERSION)"-pre${{ github.sha }} + fi + echo version="$version" >> "$GITHUB_ENV" echo changelog_version_heading="## main" >> "$GITHUB_ENV" - name: Extract changelog for version