File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Package to GitHub Packages
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ jobs :
8+ publish :
9+ runs-on : ubuntu-latest
10+ permissions :
11+ contents : read
12+ packages : write # Needed to publish packages
13+
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v4
17+ with :
18+ submodules : true # Ensure submodules are checked out if needed
19+
20+ - name : Set up JDK 8
21+ uses : actions/setup-java@v4
22+ with :
23+ java-version : " 8"
24+ distribution : " zulu"
25+ cache : maven
26+
27+ - name : Configure Maven Settings for GitHub Packages
28+ uses : actions/setup-java@v4
29+ with :
30+ java-version : " 8" # Repeat setup to ensure settings are configured
31+ distribution : " zulu"
32+ server-id : github # Value of the distributionManagement/repository/id field of the pom.xml
33+ settings-path : ${{ github.workspace }} # location for the settings.xml file
34+
35+ - name : Publish package
36+ run : mvn --batch-mode deploy -DskipTests=true
37+ env :
38+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Provided by Actions, used for authentication
Original file line number Diff line number Diff line change 66 <groupId >org.parallaxsecond</groupId >
77 <artifactId >parsec-java</artifactId >
88 <version >1.0.0-SNAPSHOT</version >
9+ <distributionManagement >
10+ <repository >
11+ <id >github</id > <!-- MUST match the server-id in the workflow -->
12+ <name >GitHub Apache Maven Packages</name >
13+ <url >https://maven.pkg.github.com/parallaxsecond/parsec-client-java</url > <!-- Replace OWNER/REPOSITORY -->
14+ </repository >
15+ </distributionManagement >
916 <properties >
1017 <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
1118 <logback .version>1.3.15</logback .version>
You can’t perform that action at this time.
0 commit comments