Skip to content

Commit

Permalink
Merge pull request #211 from FIUS/fixPackageRelease
Browse files Browse the repository at this point in the history
Fix package release
  • Loading branch information
graefjk authored Jan 3, 2024
2 parents 5cf2b8d + 0524cd7 commit c319bdb
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/deploySettings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">

<activeProfiles>
<activeProfile>github</activeProfile>
</activeProfiles>

<profiles>
<profile>
<id>github</id>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/OWNER/REPOSITORY</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>

<servers>
<server>
<id>github</id>
<username>${github.user}</username>
<password>${github.token}</password>
</server>
</servers>
</settings>

7 changes: 5 additions & 2 deletions .github/workflows/releaseToGithubPackages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ jobs:
with:
java-version: '11'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Publish package
run: mvn --batch-mode deploy
run: ./mvnw -s "${{ github.workspace }}/scriptsAndTools/internalOrCiOnly/deploySettings.xml" deploy -Dgithub.user=$GITHUB_USER -Dgithub.token=$GITHUB_TOKEN
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_USER: ${{ secrets.MAVEN_REPO_USER }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit c319bdb

Please sign in to comment.