-
Notifications
You must be signed in to change notification settings - Fork 163
almost automatic release to Maven Central #1016
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
base: main
Are you sure you want to change the base?
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 |
|---|---|---|
|
|
@@ -94,7 +94,7 @@ jobs: | |
| path: _tmp/jazzer.jar | ||
| if-no-files-found: error | ||
|
|
||
| maven_predeploy: | ||
| maven_deploy: | ||
| runs-on: ubuntu-22.04 | ||
| needs: merge_jars | ||
|
|
||
|
|
@@ -128,16 +128,31 @@ jobs: | |
| env: | ||
| RELEASE_SIGNING_KEY_ID: ${{ secrets.RELEASE_SIGNING_KEY_ID }} | ||
| RELEASE_SIGNING_KEY_PRIVATE: ${{ secrets.RELEASE_SIGNING_KEY_PRIVATE }} | ||
| MAVEN_USER: ${{ secrets.MAVEN_USER }} | ||
| MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | ||
| run: JAZZER_JAR_PATH="$(pwd)/_tmp/jazzer.jar" bazel run deploy | ||
| run: | | ||
| JAZZER_JAR_PATH="$(pwd)/_tmp/jazzer.jar" bazel run deploy | ||
| cd _tmp | ||
| tar -czvf jazzer-maven-central-bundle.tar.gz -C release com | ||
|
|
||
| # In case something goes wrong, we can still reupload the bundle manually | ||
| - name: Upload Jazzer Bundle to Github Artifacts | ||
| uses: actions/upload-artifact@v5 | ||
| with: | ||
| name: jazzer-maven-central-bundle | ||
| path: _tmp/release | ||
| path: _tmp/jazzer-maven-central-bundle.tar.gz | ||
| if-no-files-found: error | ||
| # don't wrap .tar.gz in a .zip | ||
| compression-level: 0 | ||
|
|
||
| - name: Deploy to Maven Central | ||
| shell: bash | ||
| run: | | ||
| TAG=${{ github.ref_name }} | ||
| curl --request POST \ | ||
| --verbose \ | ||
| --fail-with-body \ | ||
| --header "Authorization: Bearer ${{ secrets.SONATYPE_BEARER_TOKEN }}" \ | ||
| --form bundle=@_tmp/jazzer-maven-central-bundle.tar.gz \ | ||
| "https://central.sonatype.com/api/v1/publisher/upload?name=Jazzer%20${TAG#v}&publishingType=AUTOMATIC" | ||
|
Contributor
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. Do you know how error during publishing would show up?
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. Ah, yes, I though about it, but deemed not worth the effort!
Contributor
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. Sounds good. Making it a two step process is already a lot better than the current. |
||
|
|
||
| create_release: | ||
| needs: build_release | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.