Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate binds to Android and iOS #51

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6cae210
configure kos-rs to generate binds to android/ios
daniellfalcao Aug 27, 2024
771e325
create action to publish ios framework
daniellfalcao Aug 27, 2024
93ac3f8
update publish-ios.yaml
daniellfalcao Aug 27, 2024
ad541d6
update publish-ios.yaml
daniellfalcao Aug 27, 2024
b9829f7
update publish-ios.yaml
daniellfalcao Aug 27, 2024
ab1d4be
update publish-ios.yaml
daniellfalcao Aug 27, 2024
7c50e70
update publish-ios.yaml
daniellfalcao Aug 27, 2024
72f68b0
update publish-ios.yaml
daniellfalcao Aug 27, 2024
f21ceb0
update publish-ios.yaml
daniellfalcao Aug 27, 2024
5b67fe6
update publish-ios.yaml
daniellfalcao Aug 27, 2024
1b672bc
create swift package and script to update package
daniellfalcao Aug 27, 2024
76e0d82
configure release creation
daniellfalcao Aug 27, 2024
b04ab35
Merge remote-tracking branch 'origin/develop' into develop
daniellfalcao Aug 27, 2024
423adc8
update publish-ios.yaml
daniellfalcao Aug 27, 2024
93c4bfa
update publish-ios.yaml
daniellfalcao Aug 27, 2024
0a3d2dc
update publish-ios.yaml
daniellfalcao Aug 27, 2024
e2a2674
update publish-ios.yaml
daniellfalcao Aug 27, 2024
5cf8b25
update publish-ios.yaml
daniellfalcao Aug 27, 2024
1af92b5
update publish-ios.yaml
daniellfalcao Aug 27, 2024
e61370e
update publish-ios.yaml
daniellfalcao Aug 27, 2024
4b7ee6b
update publish-android.yaml
daniellfalcao Aug 27, 2024
4ef3c57
update publish-android.yaml
daniellfalcao Aug 27, 2024
dd9ad58
update publish-android.yaml
daniellfalcao Aug 27, 2024
b6be1ec
update repositories
daniellfalcao Aug 28, 2024
1c08d70
update cargo
daniellfalcao Aug 28, 2024
276af4f
remove comments
daniellfalcao Aug 28, 2024
70cf8f5
resolve linting issues
daniellfalcao Aug 28, 2024
6ca5243
resolve linting issues
daniellfalcao Aug 28, 2024
a63187f
Merge branch 'develop' into update
daniellfalcao Aug 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/publish-android.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish Android
on:
release:
types: [ created ]
jobs:
publish-package:
runs-on: [ "macos-14" ]
env:
TERM: xterm
GITHUB_TOKEN: ${{ secrets.git_pass }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Build and Test Android
run: |
brew install protobuf
cargo clean
make clean-mobile-build
make test-android
daniellfalcao marked this conversation as resolved.
Show resolved Hide resolved
- name: Publish Package
run: |
export LIB_VERSION=${GITHUB_REF#refs/tags/}
echo "Publishing version $LIB_VERSION"
make publish-android
91 changes: 91 additions & 0 deletions .github/workflows/publish-ios.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Publish iOS
on:
release:
types: [ created ]
permissions:
contents: write
jobs:
upload-xcframework:
runs-on: [ "macos-14" ]
env:
TERM: xterm
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Build and Test Framework
run: |
brew install protobuf
cargo clean
make clean-mobile-build
make test-ios
- name: Generate checksum
run: |
swift package compute-checksum packages/kos-mobile/ios/XCFrameworks/KOSMobile.xcframework.zip > checksum.txt
- name: Upload checksum
uses: actions/upload-artifact@v4
with:
name: checksum
path: checksum.txt
- name: Upload Release Asset
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.git_pass }}
with:
name: ${{ github.event.release.name }}
files: ./packages/kos-mobile/ios/XCFrameworks/KOSMobile.xcframework.zip

create-ios-release:
needs: upload-xcframework
runs-on: [ "macos-14" ]
env:
TERM: xterm
GITHUB_TOKEN: ${{ secrets.git_pass }}
steps:
- name: Checkout kos-rs-xcframework
uses: actions/checkout@v4
with:
repository: klever-io/kos-rs-xcframework
token: ${{ secrets.git_pass }}
- name: Download checksum
uses: actions/download-artifact@v4
with:
name: checksum
path: .
- name: Update Swift Package Url and Checksum
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
export NEW_URL="https://github.com/klever-io/kos-rs/releases/download/$TAG_NAME/KOSMobile.xcframework.zip"
export NEW_CHECKSUM=$(cat checksum.txt)
daniellfalcao marked this conversation as resolved.
Show resolved Hide resolved
echo "URL: $NEW_URL"
echo "Checksum: $NEW_CHECKSUM"
chmod +x ./update_package.sh
./update_package.sh
- name: Commit Changes
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git add -f Package.swift
git commit -m "Update package.swift"
git push origin main
- name: Create Release
run: |
brew install jq
TAG_NAME=${GITHUB_REF#refs/tags/}
RELEASE_NAME="${{ github.event.release.name }}"
RELEASE_BODY="${{ github.event.release.body }}"
PRERELEASE=${{ github.event.release.prerelease }}
ESCAPED_BODY=$(echo "${RELEASE_BODY}" | jq -Rsa .)
curl -f -X POST \
-H "Authorization: token $GITHUB_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tag_name": "'"${TAG_NAME}"'",
"target_commitish": "main",
"name": "'"${RELEASE_NAME}"'",
"body": '"${ESCAPED_BODY}"',
"draft": false,
"prerelease": '"${PRERELEASE}"'
}' \
https://api.github.com/repos/klever-io/kos-rs-xcframework/releases
Loading
Loading