diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b99d5830a..90da45eb6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,8 +28,4 @@ jobs: - name: Run iOS build script run: | - ZIP_PATH=$(sh ./scripts/ios/release.sh | tail -n 1) - echo "🔮 ZIP_PATH: $ZIP_PATH" - - - name: Configure Package.swift for remote development - run: sed -i '' 's/let useLocalFramework = true/let useLocalFramework = false/' Package.swift \ No newline at end of file + sh ./scripts/ios/release.sh \ No newline at end of file diff --git a/README.md b/README.md index 18eee1969..5299ac104 100644 --- a/README.md +++ b/README.md @@ -216,40 +216,101 @@ cargo tarpaulin --out Html cargo nextest run ``` -# Build -## CD -See [`.github/workflows/release.yml`](.github/workflows/release.yml) +# Build local -## Local +## iOS -### iOS +### Prerequisites -#### Prerequisites - -##### Rust targets +#### Rust targets ```sh rustup target add x86_64-apple-ios aarch64-apple-ios aarch64-apple-ios-sim ``` -##### `jq` +#### `jq` [_`jq` is a lightweight and flexible command-line JSON processor._](https://jqlang.github.io/jq/) Used in build script ```sh brew install jq ``` -#### Build +### Build Find [script here](scripts/ios/build-sargon.sh) ```sh ./scripts/build-ios.sh ``` +## Android +TBD + +# Release + +## iOS +### Locally + +#### Prerequisites + +> [!IMPORTANT] +> You will need the prerequisites of _Build local_ above. + +##### Install `gh` + +```sh +brew install gh +``` + +##### Github PAT +Create a Github Personal Access Token (PAT) labeled "Classic" and give it these permissions: +`write:packages` +`admin:org -> read:org` + +#### Manually release + +For the first time, you must: +```sh +gh auth login +``` + +Do this: +```sh +? What account do you want to log into? GitHub.com +? What is your preferred protocol for Git operations on this host? SSH +? Upload your SSH public key to your GitHub account? Skip +? How would you like to authenticate GitHub CLI? Paste an authentication token +Tip: you can generate a Personal Access Token here https://github.com/settings/tokens +The minimum required scopes are 'repo', 'read:org'. +? Paste your authentication token: **************************************** +``` + +If successful you should see: +```sh +- gh config set -h github.com git_protocol ssh +✓ Configured git protocol +✓ Logged in as +``` + +Find [script here](scripts/ios/release.sh) +```sh +./scripts/ios/release.sh +``` + +### CD +See [`.github/workflows/release.yml`](.github/workflows/release.yml) + + +## Android +TBD + # Example apps ## iOS -Find [script here](scripts/ios/run-example.sh) +Find [script here](scripts/ios/run-example-app.sh) ```sh -./scripts/run-ios.sh +./scripts/ios/run-example-app.sh ``` + + +## Android +TBD \ No newline at end of file diff --git a/scripts/ios/release.sh b/scripts/ios/release.sh index 0b4ec1f3b..b58902e90 100755 --- a/scripts/ios/release.sh +++ b/scripts/ios/release.sh @@ -10,7 +10,4 @@ DIR="$( cd "$( dirname "$REL_DIR" )" && pwd )"; ZIP_PATH=$(sh $DIR/build-sargon.sh --release | tail -n 1) -# This print MUST be the last print. -# The path is read by `release.yml` CD pipeline! -# This is probably terrible... but I'm a Rust/Swift dev, not a bash script dev... -echo "$ZIP_PATH" \ No newline at end of file +gh release \ No newline at end of file