simple-c2pa

This is a fork of https://gitlab.com/guardianproject/proofmode/simple-c2pa
git clone git://archive.git.mtrnord.blog/mtrnords-photography-manager/simple-c2pa.git
Log | Files | Refs | README | LICENSE

commit 8b1393a2325b0c9d8f5d1ca45aa636aed5ebb4f8
parent 1b263f9c1f195688e77b77a2cb02c348f6644717
Author: Darren Clarke <darren@redaranj.com>
Date:   Thu,  9 Nov 2023 09:53:33 +0100

Add release stage

Diffstat:
Mmobile/apple/.gitlab-ci.yml | 21+++++++++++++++++++++
Mmobile/apple/build.sh | 6++++--
2 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/mobile/apple/.gitlab-ci.yml b/mobile/apple/.gitlab-ci.yml @@ -1,5 +1,6 @@ stages: - build + - release .macos_runners: tags: @@ -16,3 +17,23 @@ build_apple: artifacts: paths: - ./mobile/apple/out/ + +release_apple: + stage: release + image: registry.gitlab.com/gitlab-org/release-cli:latest + rules: + - if: $CI_COMMIT_TAG + when: never + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + script: + - echo "running release_apple for $TAG" + release: + tag_name: "v0.$CI_PIPELINE_IID" + description: "v0.$CI_PIPELINE_IID" + ref: "$CI_COMMIT_SHA" + assets: + links: + - name: "simple_c2pa_mobile.swift" + url: "https://gitlab.com/guardianproject/proofmode/simple-c2pa/-/jobs/$JOB_ID/artifacts/download" + - name: "simple_c2pa_mobile.xcframework.zip" + url: "https://gitlab.com/guardianproject/proofmode/simple-c2pa/-/jobs/$JOB_ID/artifacts/download" diff --git a/mobile/apple/build.sh b/mobile/apple/build.sh @@ -28,7 +28,7 @@ mkdir -p "${NEW_HEADER_DIR}" cp "${HEADER_PATH}" "${NEW_HEADER_DIR}/" cp "${BINDINGS_DIR}/${NAME}FFI.modulemap" "${NEW_HEADER_DIR}/module.modulemap" -rm -rf "${OUT_DIR} +rm -rf "${OUT_DIR}" mkdir -p ${OUT_DIR} xcrun lipo -create -output "${TARGET_DIR}/simulators.a" "${TARGET_DIR}/aarch64-apple-ios-sim/${BUILD_MODE}/${STATIC_LIB_NAME}" "${TARGET_DIR}/x86_64-apple-ios/${BUILD_MODE}/${STATIC_LIB_NAME}" @@ -39,5 +39,7 @@ xcodebuild -create-xcframework \ -library "${TARGET_DIR}/simulators.a" \ -headers "${NEW_HEADER_DIR}" \ -output "${OUT_DIR}/${NAME}.xcframework" - + +zip -r "${OUT_DIR}/${NAME}.xcframework.zip" "${OUT_DIR}/${NAME}.xcframework" +rm -rf "${OUT_DIR}/${NAME}.xcframework" cp "${BINDINGS_DIR}/${NAME}.swift" "${OUT_DIR}/"