Skip to content

Commit 01b1f92

Browse files
committed
chore: automatically release to Maven Central
1 parent db110e2 commit 01b1f92

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

.github/workflows/prerelease.yaml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,17 +128,27 @@ jobs:
128128
env:
129129
RELEASE_SIGNING_KEY_ID: ${{ secrets.RELEASE_SIGNING_KEY_ID }}
130130
RELEASE_SIGNING_KEY_PRIVATE: ${{ secrets.RELEASE_SIGNING_KEY_PRIVATE }}
131-
MAVEN_USER: ${{ secrets.MAVEN_USER }}
132-
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
133-
run: JAZZER_JAR_PATH="$(pwd)/_tmp/jazzer.jar" bazel run deploy
131+
run: |
132+
JAZZER_JAR_PATH="$(pwd)/_tmp/jazzer.jar" bazel run deploy
133+
cd _tmp
134+
tar -czvf jazzer-maven-central-bundle.tar.gz -C release com
134135
136+
# In case the something goes wrong, we can still re/upload the bundle manually
135137
- name: Upload Jazzer Bundle to Github Artifacts
136138
uses: actions/upload-artifact@v5
137139
with:
138140
name: jazzer-maven-central-bundle
139-
path: _tmp/release
141+
path: _tmp/jazzer-maven-central-bundle.tar.gz
140142
if-no-files-found: error
141143

144+
- name: Deploy to Maven Central
145+
run: |
146+
curl --request POST \
147+
--verbose \
148+
--header "Authorization: Bearer ${{ secrets.SONATYPE_BEARER_TOKEN }}" \
149+
--form bundle=_tmp/jazzer-maven-central-bundle.tar.gz \
150+
https://central.sonatype.com/api/v1/publisher/upload?publishingType=AUTOMATIC
151+
142152
create_release:
143153
needs: build_release
144154
runs-on: ubuntu-24.04

0 commit comments

Comments
 (0)