Skip to content

Commit

Permalink
Readme aboult release
Browse files Browse the repository at this point in the history
  • Loading branch information
CyonAlexRDX committed Feb 16, 2024
1 parent d14b24e commit aefd2d3
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 21 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
sh ./scripts/ios/release.sh
85 changes: 73 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <YOUR_GH_USERNAME>
```
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
5 changes: 1 addition & 4 deletions scripts/ios/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
gh release

0 comments on commit aefd2d3

Please sign in to comment.