From c08cb196c00829672c0ed4493cf60a1bb5bc914d Mon Sep 17 00:00:00 2001 From: Steven Sherry Date: Fri, 12 Apr 2024 11:48:03 -0500 Subject: [PATCH] chore: Add workflow_dispatch release variant --- .github/workflows/build-and-release.yaml | 13 +++++++++---- .github/workflows/dispatch-release.yaml | 24 ++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/dispatch-release.yaml diff --git a/.github/workflows/build-and-release.yaml b/.github/workflows/build-and-release.yaml index d5877eb..ed39581 100644 --- a/.github/workflows/build-and-release.yaml +++ b/.github/workflows/build-and-release.yaml @@ -12,8 +12,6 @@ on: secrets: XCFRAMEWORK_SIGNING_TOKEN: required: true - # RELEASE_TOKEN: - # required: true jobs: build: @@ -23,9 +21,16 @@ jobs: - run: sudo xcode-select --switch /Applications/Xcode_15.1.app - uses: actions/checkout@v4 - name: Install dependencies - run: brew install ghr + run: brew install ghr xcbeautify - name: Build Capacitor and Cordova - run: ./build-cap ${{ inputs.release-version }} + run: | + set -eo pipefail + ./build-cap ${{ inputs.release-version }} | tee -a capacitor-build.log | xcbeautify --renderer github-actions + - name: Archive Log + uses: actions/upload-artifact@v4 + with: + name: capacitor-build.log + path: capacitor-build.log - name: Sign Capacitor xcframework uses: ionic-team/sign-xcframework@main with: diff --git a/.github/workflows/dispatch-release.yaml b/.github/workflows/dispatch-release.yaml new file mode 100644 index 0000000..be89b95 --- /dev/null +++ b/.github/workflows/dispatch-release.yaml @@ -0,0 +1,24 @@ +name: Dispatch Release + +on: + workflow_dispatch: + inputs: + release-version: + description: The version to release + required: true + type: string + draft-flag: + description: "Create a Draft Release or Immediately Release" + type: choice + default: -draft + options: + - -draft + - "" + +jobs: + create-release: + uses: ./.github/workflows/build-and-release.yaml + with: + release-version: ${{ inputs.release-version }} + draft-flag: ${{ inputs.draft-flag }} + secrets: inherit