android #1728
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # File generated by `go run ./internal/cmd/ghgen`; DO NOT EDIT. | |
| name: android | |
| on: | |
| push: | |
| branches: | |
| - "release/**" | |
| - "fullbuild" | |
| - "androidbuild" | |
| tags: | |
| - "v*" | |
| schedule: | |
| - cron: "17 1 * * *" | |
| jobs: | |
| build_android: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get GOVERSION content | |
| id: goversion | |
| run: echo "version=$(cat GOVERSION)" >> "$GITHUB_OUTPUT" | |
| - uses: magnetikonline/action-golang-cache@v4 | |
| with: | |
| go-version: "${{ steps.goversion.outputs.version }}" | |
| cache-key-suffix: "-android-${{ steps.goversion.outputs.version }}" | |
| - run: ./MOBILE/android/ensure | |
| - run: make android | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: oonimkall.aar | |
| path: ./MOBILE/android/oonimkall.aar | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: oonimkall-sources.jar | |
| path: ./MOBILE/android/oonimkall-sources.jar | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: miniooni-android-386 | |
| path: ./CLI/miniooni-android-386 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ooniprobe-android-386 | |
| path: ./CLI/ooniprobe-android-386 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: miniooni-android-amd64 | |
| path: ./CLI/miniooni-android-amd64 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ooniprobe-android-amd64 | |
| path: ./CLI/ooniprobe-android-amd64 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: miniooni-android-arm | |
| path: ./CLI/miniooni-android-arm | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ooniprobe-android-arm | |
| path: ./CLI/ooniprobe-android-arm | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: miniooni-android-arm64 | |
| path: ./CLI/miniooni-android-arm64 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ooniprobe-android-arm64 | |
| path: ./CLI/ooniprobe-android-arm64 | |
| publish_android_github: | |
| runs-on: ubuntu-22.04 | |
| needs: build_android | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: oonimkall.aar | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: oonimkall-sources.jar | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: miniooni-android-386 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: ooniprobe-android-386 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: miniooni-android-amd64 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: ooniprobe-android-amd64 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: miniooni-android-arm | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: ooniprobe-android-arm | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: miniooni-android-arm64 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: ooniprobe-android-arm64 | |
| - run: ./script/ghpublish.bash oonimkall.aar oonimkall-sources.jar miniooni-android-386 ooniprobe-android-386 miniooni-android-amd64 ooniprobe-android-amd64 miniooni-android-arm ooniprobe-android-arm miniooni-android-arm64 ooniprobe-android-arm64 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| publish_android_maven: | |
| runs-on: ubuntu-22.04 | |
| needs: build_android | |
| if: github.event_name != 'schedule' | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| server-id: central | |
| server-username: MAVEN_USERNAME | |
| server-password: MAVEN_PASSWORD | |
| gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | |
| gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
| - name: Download oonimkall aar | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: oonimkall.aar | |
| path: MULTIPLATFORM | |
| - name: Set Project Version | |
| run: | | |
| if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then | |
| VERSION="${GITHUB_REF_NAME#v}" | |
| else | |
| SHORT_SHA=$(echo "${GITHUB_SHA}" | cut -c1-8) | |
| VERSION="${SHORT_SHA}" | |
| fi | |
| echo "Generated version: $VERSION" | |
| mvn -f MULTIPLATFORM/pom.xml versions:set -P deploy-android -DnewVersion=${VERSION}-android -DremoveSnapshot=true | |
| env: | |
| # Maven versions plugin might need GPG passphrase if it triggers a 'verify' phase. | |
| MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| - name: Publish to Maven Central | |
| run: | | |
| mvn -f MULTIPLATFORM/pom.xml clean deploy -P deploy-android --batch-mode -DskipTests | |
| env: | |
| MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
| MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | |
| MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} |