From 1ee23e2a2e9e099591674a12691d2630f040e8fa Mon Sep 17 00:00:00 2001 From: Cristiano Castro Date: Tue, 17 Feb 2026 11:18:06 +0000 Subject: [PATCH 1/2] APPS-24412: add GitHub iOS build script (without SPM support yet) --- .github/workflows/ios-framework-release.yml | 95 +++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 .github/workflows/ios-framework-release.yml diff --git a/.github/workflows/ios-framework-release.yml b/.github/workflows/ios-framework-release.yml new file mode 100644 index 0000000000..3d86a0c01f --- /dev/null +++ b/.github/workflows/ios-framework-release.yml @@ -0,0 +1,95 @@ +name: iOS framework build + +on: + push: + tags: + - "*" + workflow_dispatch: + inputs: + tag: + description: "Optional. If set, update/create the GitHub Release for this tag. If empty, no release is modified." + required: false + type: string + +env: + OUTPUT_DIR: ios_framework/artifact + +jobs: + build-ios-framework: + runs-on: macos-14 + permissions: + contents: write + + steps: + - name: Checkout + uses: actions/checkout@v4 + + # Decide what "version string" to use for naming the zip. + # - push tag: github.ref_name + # - manual with inputs.tag: that tag + # - manual without tag: a unique run-based value, and NO release updates + - name: Compute version/tag + id: meta + shell: bash + run: | + set -euo pipefail + + if [[ "${{ github.event_name }}" == "push" ]]; then + ver="${{ github.ref_name }}" + do_release="true" + release_tag="${{ github.ref_name }}" + else + if [[ -n "${{ inputs.tag }}" ]]; then + ver="${{ inputs.tag }}" + do_release="true" + release_tag="${{ inputs.tag }}" + else + ver="manual-${{ github.run_number }}-${{ github.run_attempt }}" + do_release="false" + release_tag="" + fi + fi + + echo "ver=$ver" >> "$GITHUB_OUTPUT" + echo "zip_name=pjsip-ios-$ver.zip" >> "$GITHUB_OUTPUT" + echo "zip_path=${{ env.OUTPUT_DIR }}/pjsip-ios-$ver.zip" >> "$GITHUB_OUTPUT" + echo "do_release=$do_release" >> "$GITHUB_OUTPUT" + echo "release_tag=$release_tag" >> "$GITHUB_OUTPUT" + + - name: Clean output folder + run: | + rm -rf "${{ env.OUTPUT_DIR }}" + mkdir -p "${{ env.OUTPUT_DIR }}" + + - name: Build framework + run: | + cd ios_framework + ./build_ios_framework.sh \ + --source-dir="${{ github.workspace }}" \ + --output-dir="$PWD/artifact" \ + --name="pjsip-ios-${{ steps.meta.outputs.ver }}" + + - name: Verify expected zip exists + shell: bash + run: | + set -euo pipefail + ls -la "${{ env.OUTPUT_DIR }}" + test -f "${{ steps.meta.outputs.zip_path }}" + + - name: Upload build artifact (manual runs without tag) + if: ${{ steps.meta.outputs.do_release == 'false' }} + uses: actions/upload-artifact@v4 + with: + name: ${{ steps.meta.outputs.zip_name }} + path: ${{ steps.meta.outputs.zip_path }} + if-no-files-found: error + + - name: Publish / update GitHub release (tag builds or manual runs with tag) + if: ${{ steps.meta.outputs.do_release == 'true' }} + uses: ncipollo/release-action@v1 + with: + tag: ${{ steps.meta.outputs.release_tag }} + artifacts: ${{ steps.meta.outputs.zip_path }} + allowUpdates: true + omitNameDuringUpdate: true + replacesArtifacts: true \ No newline at end of file From 0c6739e552f3f34b963bad48893125ebc43469fd Mon Sep 17 00:00:00 2001 From: Cristiano Castro Date: Wed, 18 Feb 2026 10:26:44 +0000 Subject: [PATCH 2/2] APPS-24412: renamed the script to a manual one, without push trigger, and removed unnecessary code --- ...e.yml => ios-framework-release-manual.yml} | 40 +++++-------------- 1 file changed, 10 insertions(+), 30 deletions(-) rename .github/workflows/{ios-framework-release.yml => ios-framework-release-manual.yml} (66%) diff --git a/.github/workflows/ios-framework-release.yml b/.github/workflows/ios-framework-release-manual.yml similarity index 66% rename from .github/workflows/ios-framework-release.yml rename to .github/workflows/ios-framework-release-manual.yml index 3d86a0c01f..a1b487827b 100644 --- a/.github/workflows/ios-framework-release.yml +++ b/.github/workflows/ios-framework-release-manual.yml @@ -1,9 +1,6 @@ -name: iOS framework build +name: iOS framework build (manual) on: - push: - tags: - - "*" workflow_dispatch: inputs: tag: @@ -12,6 +9,8 @@ on: type: string env: + # There is a tie-in in "Build framework" because we need to cd into ios_framework + # If we ever change this we need to update that step as well OUTPUT_DIR: ios_framework/artifact jobs: @@ -25,7 +24,6 @@ jobs: uses: actions/checkout@v4 # Decide what "version string" to use for naming the zip. - # - push tag: github.ref_name # - manual with inputs.tag: that tag # - manual without tag: a unique run-based value, and NO release updates - name: Compute version/tag @@ -34,20 +32,14 @@ jobs: run: | set -euo pipefail - if [[ "${{ github.event_name }}" == "push" ]]; then - ver="${{ github.ref_name }}" + if [[ -n "${{ inputs.tag }}" ]]; then + ver="${{ inputs.tag }}" do_release="true" - release_tag="${{ github.ref_name }}" + release_tag="${{ inputs.tag }}" else - if [[ -n "${{ inputs.tag }}" ]]; then - ver="${{ inputs.tag }}" - do_release="true" - release_tag="${{ inputs.tag }}" - else - ver="manual-${{ github.run_number }}-${{ github.run_attempt }}" - do_release="false" - release_tag="" - fi + ver="manual-${{ github.run_number }}-${{ github.run_attempt }}" + do_release="false" + release_tag="" fi echo "ver=$ver" >> "$GITHUB_OUTPUT" @@ -56,11 +48,6 @@ jobs: echo "do_release=$do_release" >> "$GITHUB_OUTPUT" echo "release_tag=$release_tag" >> "$GITHUB_OUTPUT" - - name: Clean output folder - run: | - rm -rf "${{ env.OUTPUT_DIR }}" - mkdir -p "${{ env.OUTPUT_DIR }}" - - name: Build framework run: | cd ios_framework @@ -69,13 +56,6 @@ jobs: --output-dir="$PWD/artifact" \ --name="pjsip-ios-${{ steps.meta.outputs.ver }}" - - name: Verify expected zip exists - shell: bash - run: | - set -euo pipefail - ls -la "${{ env.OUTPUT_DIR }}" - test -f "${{ steps.meta.outputs.zip_path }}" - - name: Upload build artifact (manual runs without tag) if: ${{ steps.meta.outputs.do_release == 'false' }} uses: actions/upload-artifact@v4 @@ -84,7 +64,7 @@ jobs: path: ${{ steps.meta.outputs.zip_path }} if-no-files-found: error - - name: Publish / update GitHub release (tag builds or manual runs with tag) + - name: Publish / update GitHub release (manual runs with tag) if: ${{ steps.meta.outputs.do_release == 'true' }} uses: ncipollo/release-action@v1 with: