Skip to content

Commit

Permalink
Merge pull request #2 from MaastrichtU-CDS/master
Browse files Browse the repository at this point in the history
merge master into library
  • Loading branch information
fvandaalen authored Feb 13, 2023
2 parents ca1fca9 + b0ec1fb commit 764d3ab
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 3 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/buildMavenProject.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish package to GitHub Packages
on:
release:
types: [created]
defaults:
run:
working-directory: java
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '15'
distribution: 'adopt'
- name: Publish package
run: mvn --batch-mode deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19 changes: 16 additions & 3 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.6</version>
</parent>

<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<properties>
<maven.compiler.source>15</maven.compiler.source>
<maven.compiler.target>15</maven.compiler.target>
Expand Down Expand Up @@ -199,5 +205,12 @@
<!-- </plugin>-->
</plugins>
</build>

</project>

<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/MaastrichtU-CDS/n-scalar-product-protocol</url>
</repository>
</distributionManagement>
</project>
22 changes: 22 additions & 0 deletions workflows/buildMavenProject.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Publish package to the Maven Central Repository
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish package
run: mvn --batch-mode deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

0 comments on commit 764d3ab

Please sign in to comment.