Skip to content

Commit

Permalink
Merge pull request #56 from matrix-org/bca/fix_crypto_release_workflow
Browse files Browse the repository at this point in the history
Fix crypto sdk release script
  • Loading branch information
BillCarsonFr committed May 15, 2024
2 parents 69b71fa + 50d10e0 commit 0163601
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/release_crypto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
jobs:
build_native:
name: Build and generate crypto native libs
runs-on: macos-latest
runs-on: ubuntu-latest
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
Expand Down Expand Up @@ -60,10 +60,10 @@ jobs:
with:
ndk-version: r25c

- name: Create symlinks for buildchain
run: |
export PATH="${{ steps.install-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/darwin-x86_64/bin:$PATH"
echo $PATH
# - name: Create symlinks for buildchain
# run: |
# export PATH="${{ steps.install-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/darwin-x86_64/bin:$PATH"
# echo $PATH

- uses: actions/cache@v4
with:
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
- name: Run build script
env:
ANDROID_NDK: ${{ steps.install-ndk.outputs.ndk-path }}
run: ./main/scripts/build.sh -r -m crypto -p rust-sdk
run: ./scripts/build.sh -r -m crypto -p rust-sdk

- name: Find all .aar files
run: find . -name "*.aar"
Expand All @@ -132,7 +132,7 @@ jobs:
CRYPTO_SDK_VERSION: ${{ github.event.inputs.crypto-sdk-version }}
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python3 ./main/scripts/release_crypto.py --version ${{ github.event.inputs.crypto-sdk-version }} --sdk_path ./rust-sdk
python3 ./scripts/release_crypto.py --version ${{ github.event.inputs.crypto-sdk-version }} --sdk_path ./rust-sdk
# - name: Run test python
# run: |
Expand Down
3 changes: 2 additions & 1 deletion scripts/release_crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ def get_git_hash(directory: str) -> str:

def commit_and_push_changes(directory: str, message: str):
try:
subprocess.run(["git", "add", "."], cwd=directory, check=True)
subprocess.run(["git", "add", "buildSrc/src/main/kotlin/BuildVersionsCrypto.kt"], cwd=directory, check=True)
subprocess.run(["git", "add", "crypto/crypto-android/src/main/kotlin/org/matrix/rustcomponents/sdk/crypto/matrix_sdk_crypto_ffi.kt"], cwd=directory, check=True)
subprocess.run(["git", "commit", "-m", message], cwd=directory, check=True)
subprocess.run(["git", "push"], cwd=directory, check=True)
print("Changes committed and pushed successfully.")
Expand Down

0 comments on commit 0163601

Please sign in to comment.