Skip to content

Commit

Permalink
Setup manual push to OSSRH
Browse files Browse the repository at this point in the history
  • Loading branch information
Layoric committed Oct 11, 2023
1 parent 860f242 commit be1e981
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 0 deletions.
File renamed without changes.
39 changes: 39 additions & 0 deletions .github/workflows/publish-android-maven-central.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish android to Maven Central

on:
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Java
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'

- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle

- name: Set up permissions client
run: chmod +x ./src/AndroidClient/gradlew

- name: Build android
working-directory: ./src/AndroidClient
run: ./gradlew android:build

- name: Publish to Maven Central
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
working-directory: ./src/AndroidClient
run: ./gradlew android:publishAllPublicationsToOSSRHRepository
39 changes: 39 additions & 0 deletions .github/workflows/publish-client-maven-central.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish client to Maven Central

on:
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Java
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'

- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle

- name: Set up permissions client
run: chmod +x ./src/AndroidClient/gradlew

- name: Build client
working-directory: ./src/AndroidClient
run: ./gradlew client:build

- name: Publish to Maven Central
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
working-directory: ./src/AndroidClient
run: ./gradlew client:publishAllPublicationsToOSSRHRepository

0 comments on commit be1e981

Please sign in to comment.