File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Publish to Maven Central
2+ on :
3+ release :
4+ types : [published]
5+
6+ defaults :
7+ run :
8+ shell : bash
9+
10+ jobs :
11+ publish :
12+ runs-on : windows-latest
13+ if : startsWith(github.ref, 'refs/tags/') # only allow publishing tagged versions
14+ steps :
15+ - uses : actions/checkout@v3
16+ - uses : actions/setup-java@v3
17+ with :
18+ distribution : ' temurin'
19+ java-version : 19
20+ cache : ' maven'
21+ gpg-private-key : ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
22+ gpg-passphrase : MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
23+ - name : Enforce project version ${{ github.event.release.tag_name }}
24+ run : mvn versions:set -B -DnewVersion="${{ github.event.release.tag_name }}"
25+ - name : Deploy
26+ run : mvn deploy -B -DskipTests -Psign,deploy-central --no-transfer-progress
27+ env :
28+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
29+ MAVEN_GPG_PASSPHRASE : ${{ secrets.RELEASES_GPG_PASSPHRASE }}
You can’t perform that action at this time.
0 commit comments