From 2295960a74a10f5fdbcede44ef71717357e97d4c Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Tue, 30 Jun 2026 12:05:51 +0800 Subject: [PATCH] chore: resolve merge conflict in pubspec.yaml (#66) Co-authored-by: Haitao Pan --- .github/workflows/build-and-release.yml | 12 ++++++++++++ pubspec.yaml | 2 +- scripts/package-macos-app-store-pkg.sh | 8 +++++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index d6b950de..75f20455 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -35,6 +35,10 @@ on: description: "Build & upload TestFlight (macOS/iOS App Store) artifacts" type: boolean default: false + enable_github_release: + description: "Upload assets to GitHub Release" + type: boolean + default: true permissions: contents: read @@ -54,6 +58,7 @@ jobs: contents: write outputs: should_release: ${{ steps.flags.outputs.should_release }} + github_release_enabled: ${{ steps.flags.outputs.github_release_enabled }} testflight_enabled: ${{ steps.flags.outputs.testflight_enabled }} release_tag: ${{ steps.meta.outputs.release_tag }} release_title: ${{ steps.meta.outputs.release_title }} @@ -68,6 +73,7 @@ jobs: id: flags shell: bash env: + ENABLE_GITHUB_RELEASE_INPUT: ${{ github.event.inputs.enable_github_release }} ENABLE_TESTFLIGHT_INPUT: ${{ github.event.inputs.enable_testflight }} ENABLE_TESTFLIGHT_VAR: ${{ vars.ENABLE_TESTFLIGHT }} run: | @@ -77,6 +83,12 @@ jobs: echo "should_release=false" >> "$GITHUB_OUTPUT" fi + if [[ "${GITHUB_EVENT_NAME:-}" == "workflow_dispatch" && "${ENABLE_GITHUB_RELEASE_INPUT:-}" == "false" ]]; then + echo "github_release_enabled=false" >> "$GITHUB_OUTPUT" + else + echo "github_release_enabled=true" >> "$GITHUB_OUTPUT" + fi + # TestFlight is opt-in (default OFF). Enabled only when explicitly # requested via the workflow_dispatch input or the ENABLE_TESTFLIGHT # repo/org variable. Keeps missing Apple signing secrets from failing diff --git a/pubspec.yaml b/pubspec.yaml index 7adc1c6b..10122220 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,7 +4,7 @@ publish_to: 'none' version: 1.1.5+2 build-date: 2026-06-30 -build-id: a876e3b +build-id: a876e3b0 environment: sdk: ^3.11.0 diff --git a/scripts/package-macos-app-store-pkg.sh b/scripts/package-macos-app-store-pkg.sh index 5eff39fa..f6b967b6 100755 --- a/scripts/package-macos-app-store-pkg.sh +++ b/scripts/package-macos-app-store-pkg.sh @@ -40,7 +40,10 @@ app_build_commit="${GIT_BUILD_COMMIT:-${BUILD_ID_LINE:-unknown}}" tmp_dir="$(mktemp -d "${RUNNER_TEMP:-/tmp}/xworkmate-macos-app-store.XXXXXX")" cleanup() { + local status=$? rm -rf "$tmp_dir" + apple_run_cleanup + return "$status" } trap cleanup EXIT @@ -80,12 +83,15 @@ xcodebuild archive \ -scheme Runner \ -configuration Release \ -archivePath "$archive_path" \ + -allowProvisioningUpdates \ + -allowProvisioningDeviceRegistration \ DEVELOPMENT_TEAM="N3G9T67W78" xcodebuild -exportArchive \ -archivePath "$archive_path" \ -exportPath "$DIST_DIR" \ - -exportOptionsPlist "$export_options_path" + -exportOptionsPlist "$export_options_path" \ + -allowProvisioningUpdates if ! compgen -G "$DIST_DIR/*.pkg" >/dev/null; then echo "No macOS TestFlight pkg was produced under $DIST_DIR" >&2