Skip to content

1.0.1

1.0.1 #6

Workflow file for this run

name: CI
on:
release:
types: [ published ]
jobs:
publish:
runs-on: ubuntu-latest
if: github.repository == 'FriendlyCaptcha/friendly-captcha-android'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 20
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Check version
working-directory: sdk
run: |
VERSION=$(grep 'val sdkVersion by extra' lib/build.gradle.kts | sed 's/.*"\(.*\)".*/\1/')
if [ "$VERSION" != "${{ github.event.release.tag_name }}" ]; then
echo "Version mismatch: build.gradle.kts version is $VERSION, but release tag is ${{ github.event.release.tag_name }}"
exit 1
fi
- name: Publish Artifacts
working-directory: sdk
run: ./gradlew publishAllPublicationsToMavenCentral
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USER_TOKEN_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_USER_TOKEN_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_IN_MEMORY_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}