diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99553a77..e7345af2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,6 +66,54 @@ jobs: # Releasing # ############# + publish-android: + name: publish (Android) + if: ${{ startsWith(github.ref, 'refs/tags/') }} + needs: ["release-github"] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: gh-pages + - uses: actions/setup-java@v3 + with: + java-version: "17" + distribution: temurin + + - name: Parse release version + id: release + run: echo "version=${GITHUB_REF#refs/tags/}" + >> $GITHUB_OUTPUT + + - uses: actions/download-artifact@v3 + with: + name: build + path: package/ + - run: tar -xzvf libwebrtc-android.tar.gz + working-directory: package/ + + - name: Build Maven files + run: mvn install:install-file + -DgroupId=com.github.instrumentisto + -DartifactId=libwebrtc-bin + -Dversion=${{ steps.release.outputs.version }} + -Dfile=./package/aar/libwebrtc.aar + -Dpackaging=aar + -DgeneratePom=true + -DlocalRepositoryPath=./android/ + -DcreateChecksum=true + + - name: Publish to GitHub Pages + run: | + set -ex + + git config --local user.email 'actions+${{ github.run_number }}@github.com' + git config --local user.name 'GitHub Actions' + + git add -v android/ + git commit -m 'Release ${{ steps.release.outputs.version }} version of `libwebrtc-android`' + git push origin gh-pages + publish-cocoapods: name: publish (CocoaPods) if: ${{ startsWith(github.ref, 'refs/tags/') }} diff --git a/README.md b/README.md index 28385013..2e74c5f3 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ ====================== [![CocoaPods](https://img.shields.io/cocoapods/v/instrumentisto-libwebrtc-bin "CocoaPods")](https://cocoapods.org/pods/instrumentisto-libwebrtc-bin) -[![JitPack](https://jitpack.io/v/instrumentisto/libwebrtc-bin.svg "JitPack")](https://jitpack.io/#instrumentisto/libwebrtc-bin) [![CI](https://github.com/instrumentisto/libwebrtc-bin/workflows/CI/badge.svg?branch=main "CI")](https://github.com/instrumentisto/libwebrtc-bin/actions?query=workflow%3ACI+branch%3Amain) Build scripts for statically linked [`libwebrtc`] binaries, used by [Medea Flutter-WebRTC]. diff --git a/jitpack.yml b/jitpack.yml deleted file mode 100644 index a143b372..00000000 --- a/jitpack.yml +++ /dev/null @@ -1,2 +0,0 @@ -install: - - ./publishAar.sh diff --git a/publishAar.sh b/publishAar.sh deleted file mode 100755 index e1662a16..00000000 --- a/publishAar.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -set -ex - -VERSION=$(grep 'WEBRTC_VERSION=' VERSION | cut -d '=' -f2 | tr -d '\n') - -AAR_URL="https://github.com/instrumentisto/libwebrtc-bin/releases/download/${VERSION}/libwebrtc-android.tar.gz" - -mkdir -p package/ -cd package/ - -curl -fL -O "${AAR_URL}" -tar xf libwebrtc-android.tar.gz - -mvn install:install-file -Dfile=aar/libwebrtc.aar \ - -Dpackaging=aar \ - -Dversion=${VERSION} \ - -DgroupId=com.github.instrumentisto \ - -DartifactId=libwebrtc-bin