diff --git a/scripts/build.sh b/scripts/build.sh new file mode 100755 index 0000000..9daae31 --- /dev/null +++ b/scripts/build.sh @@ -0,0 +1,11 @@ +#!/bin/sh +set -ex + +gradle assembleSkipRevenuecatXCFramework + +cd skip-revenuecat/build/XCFrameworks/release/ + +rm -f SkipRevenuecat.xcframework.zip +zip -qr SkipRevenuecat.xcframework.zip SkipRevenuecat.xcframework +ls -lah SkipRevenuecat.xcframework.zip +shasum -a 256 SkipRevenuecat.xcframework.zip diff --git a/scripts/release.sh b/scripts/release.sh new file mode 100755 index 0000000..9e2b846 --- /dev/null +++ b/scripts/release.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -ex + +git pull + +./scripts/build.sh + +LATEST_VERSION=$(git tag -l --sort=-version:refname | grep '[0-9]*\.[0-9]*\.[0-9]*' | head -n 1) +if [ -z "${LATEST_VERSION}" ]; then LATEST_VERSION="0.0.0"; fi + +NEW_VERSION=$(semver bump ${SEMVER_BUMP:-patch} ${LATEST_VERSION}) + +ARTIFACT="skip-revenuecat/build/XCFrameworks/release/SkipRevenuecat.xcframework.zip" + +gh release create --notes "$(cat ${ARTIFACT} | shasum -a 256)" ${NEW_VERSION} ${ARTIFACT} +