-
-
Notifications
You must be signed in to change notification settings - Fork 37
ci: Publish snapshot builds to Maven Central #1107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| name: Publish Snapshot | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| publish-snapshot: | ||
| name: Publish snapshot to Maven Central | ||
| runs-on: ubuntu-latest | ||
| environment: production | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
|
|
||
| - name: Setup Gradle | ||
| uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # pin@v4 | ||
|
|
||
| - name: Set up Java | ||
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 | ||
|
BYK marked this conversation as resolved.
|
||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '17' | ||
|
|
||
| - name: Determine snapshot version | ||
| id: version | ||
| run: | | ||
| VERSION=$(grep "^version = " plugin-build/gradle.properties | cut -d' ' -f3) | ||
| echo "snapshot_version=${VERSION}-SNAPSHOT" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Publish Gradle Plugin snapshot | ||
| working-directory: plugin-build | ||
| run: > | ||
| ../gradlew publishAllPublicationsToMavenCentralSnapshotsRepository | ||
| -Pversion=${{ steps.version.outputs.snapshot_version }} | ||
| env: | ||
| ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }} | ||
| ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }} | ||
|
|
||
| - name: Publish Kotlin Compiler Plugin snapshot | ||
| working-directory: sentry-kotlin-compiler-plugin | ||
| run: > | ||
| ../gradlew publishAllPublicationsToMavenCentralSnapshotsRepository | ||
| -PVERSION_NAME=${{ steps.version.outputs.snapshot_version }} | ||
| env: | ||
| ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TIL you can do that with env variables 👀
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes to answer your question from a gradle side. from the gihtub secrets perspective, these are just placeholders. i think unfortunately these variables aren't set. i will ask around tomorrow. |
||
| ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }} | ||
Uh oh!
There was an error while loading. Please reload this page.