Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
horatiu-udrea committed Dec 8, 2024
1 parent 2104b01 commit a08f3d2
Showing 1 changed file with 15 additions and 21 deletions.
36 changes: 15 additions & 21 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle

# gh secret set ORG_GRADLE_PROJECT_mavenCentralUsername -a actions --body "<your maven central account username>"
# gh secret set ORG_GRADLE_PROJECT_mavenCentralPassword -a actions --body "<your maven central password>"
# gh secret set ORG_GRADLE_PROJECT_signingInMemoryKey -a actions --body "$(gpg --export-secret-keys --armor "<key id>" | grep -v '\-\-' | grep -v '^=.' | tr -d '\n')"
# gh secret set ORG_GRADLE_PROJECT_signingInMemoryKeyId -a actions --body "<your key id>"
# gh secret set ORG_GRADLE_PROJECT_signingInMemoryKeyPassword -a actions --body "<your key password>"
# gh secret set MAVEN_CENTRAL_USERNAME -a actions --body "<your maven central account username>"
# gh secret set MAVEN_CENTRAL_PASSWORD -a actions --body "<your maven central password>"
# gh secret set SIGNING_KEY -a actions --body "$(gpg --export-secret-keys --armor "<key id>" | grep -v '\-\-' | grep -v '^=.' | tr -d '\n')"
# gh secret set SIGNING_KEY_ID -a actions --body "<your key id>"
# gh secret set SIGNING_KEY_PASSWORD -a actions --body "<your key password>"

name: Deploy to central

Expand All @@ -23,24 +23,12 @@ jobs:
uses: ./.github/workflows/gradle.yml
deploy:
needs: build
strategy:
matrix:
include:
# - target: publishIosArm64PublicationToMavenCentral
# os: macos-latest
- target: publishAndroidReleasePublicationToMavenCentral
os: ubuntu-latest
- target: publishJvmPublicationToMavenCentral
os: ubuntu-latest
# - target: publishLinuxX64PublicationToMavenCentral
# os: ubuntu-latest
- target: publishKotlinMultiplatformPublicationToMavenCentral
os: ubuntu-latest
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v3
# Needed only for Kotlin/Native
# - uses: actions/cache@v3
# with:
# path: |
Expand All @@ -53,5 +41,11 @@ jobs:
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Gradle publish
run: ./gradlew ${{ matrix.target }} --no-configuration-cache
- name: Publish to Maven Central
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }}
run: ./gradlew publishToMavenCentral --no-configuration-cache

0 comments on commit a08f3d2

Please sign in to comment.