File tree Expand file tree Collapse file tree 2 files changed +54
-25
lines changed Expand file tree Collapse file tree 2 files changed +54
-25
lines changed Original file line number Diff line number Diff line change 1+ name : Maven Package
2+
3+ on :
4+ release :
5+ types : [created]
6+
7+ jobs :
8+ publish :
9+
10+ runs-on : ubuntu-latest
11+
12+ env :
13+ artifact_name : edt-iut-umontp
14+
15+ steps :
16+ - uses : actions/checkout@v2
17+
18+ - name : Get the release version
19+ id : get_version
20+ run : echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
21+
22+ - name : Set up JDK 11 for deploy to OSSRH
23+ uses : actions/setup-java@v1
24+ with :
25+ java-version : 11
26+ server-id : ossrh
27+ server-username : MAVEN_USERNAME
28+ server-password : MAVEN_CENTRAL_TOKEN
29+ gpg-private-key : ${{ secrets.GPG_PRIVATE_KEY }}
30+ gpg-passphrase : MAVEN_GPG_PASSPHRASE
31+
32+ - name : Build with Maven
33+ run : mvn -B package --file pom.xml
34+
35+ - name : Update package version
36+ run : mvn versions:set -DnewVersion=${{ steps.get_version.outputs.VERSION }}
37+
38+ - name : Publish to Apache Maven Central
39+ run : mvn deploy -PossrhDeploy
40+ env :
41+ MAVEN_USERNAME : ${{ secrets.NEXUS_USERNAME }}
42+ MAVEN_CENTRAL_TOKEN : ${{ secrets.NEXUS_PASSWORD }}
43+ MAVEN_GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
44+
45+ - name : Set up JDK 11 for deploy to github packages
46+ uses : actions/setup-java@v1
47+ with :
48+ java-version : 11
49+ server-id : github
50+
51+ - name : Publish to GitHub Packages Apache Maven
52+ run : mvn deploy -PgithubDeploy
53+ env :
54+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments