Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions .github/workflows/publish-to-central-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
name: Publish to Maven Central Snapshots
on:
workflow_dispatch:
inputs:
perform-a-gradle-clean:
description: "Perform a Gradle clean"
type: boolean
default: false
jobs:
build:
runs-on: [ self-hosted, Android ]
Expand All @@ -15,6 +20,9 @@ jobs:
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
- name: Perform a Gradle clean, as requested
if: ${{ github.event.inputs.perform-a-gradle-clean == 'true' }}
run: ./gradlew clean
- name: Publish the snapshots
run: ./gradlew publishAggregationToCentralSnapshots
env:
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/publish-to-maven-central.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: Publish to Maven Central
on:
workflow_dispatch:
inputs:
acknowledgement:
description: |
WARNING: Publishing a version to Maven Central is irrevocable.
Do you confirm (Yes/no):
1. You have successfully tested publishing snapshot (with a Gradle CLEAN) just before changing the version
2. The version is CORRECT, and is NOT a SNAPSHOT
3. The iOS release has already been published
4. You are pointing this workflow run to the tag that matches the version
5. You are not drunk or otherwise too tired
required: true
type: string

jobs:
build:
runs-on: [ self-hosted, Android ]
steps:
- name: Check acknowledgement
run: test "${{ github.event.inputs.acknowledgement }}" = "Yes" || (echo "Acknowledgement missing" && exit 1)
- name: Checkout sources
uses: actions/checkout@v6
- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
- name: Perform a Gradle clean
run: ./gradlew clean
- name: Publish the artifacts
run: ./gradlew publishAggregationToCentralPortal
env:
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx5g -Dfile.encoding=UTF-8"
ossrhUsername: ${{ secrets.SONATYPE_USERNAME }}
ossrhPassword: ${{ secrets.SONATYPE_PASSWORD }}
GPG_key_id: ${{ secrets.GPG_KEY_ID }}
GPG_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_private_password: ${{ secrets.GPG_PRIVATE_PASSWORD }}