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
32 changes: 32 additions & 0 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Snapshot"
on:
workflow_dispatch:
inputs:
snapshotVersion:
description: "Snapshot version"
required: true

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2

- uses: actions/setup-java@v3
with:
distribution: 'temurin' # This is the Ubuntu Default
java-version: '17'

- name: Build library
run: 'bash ./gradlew clean :library:assembleRelease'

- name: Release library
env:
MOBILE_MAVENCENTRAL_USER: ${{ secrets.MOBILE_MAVENCENTRAL_USER }}
MOBILE_MAVENCENTRAL_PASSWORD: ${{ secrets.MOBILE_MAVENCENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }}
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEYID }}
run: "bash ./gradlew publishReleasePublicationToSonatypeRepository -DSNAPSHOT_VERSION=${{ github.event.inputs.snapshotVersion }} publishNoopPublicationToSonatypeRepository -DSNAPSHOT_VERSION=${{ github.event.inputs.snapshotVersion }}
--max-workers 1 closeAndReleaseStagingRepositories"
Comment on lines +31 to +32
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we were already supporting versioning for snapshots but it wasn't being exposed through any Github workflow:

2 changes: 2 additions & 0 deletions publish_maven_central.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ nexusPublishing {
stagingProfileId = "f7fe7699e57a"
username = System.getenv("MOBILE_MAVENCENTRAL_USER")
password = System.getenv("MOBILE_MAVENCENTRAL_PASSWORD")
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
}
}
}