Update package.yml #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish package to GitHub Packages | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'adopt' | ||
- uses: whelk-io/maven-settings-xml-action@v21 | ||
with: | ||
repositories: > | ||
[ | ||
{ | ||
"id": "central", | ||
"name": "Maven Central", | ||
"url": "https://repo1.maven.org/maven2", | ||
"releases": { | ||
"enabled": "true" | ||
}, | ||
"snapshots": { | ||
"enabled": "false" | ||
} | ||
}, | ||
{ | ||
"id": "github", | ||
"name": "Studio 42", | ||
"url": "https://maven.pkg.github.com/studio42gmbh/*", | ||
"releases": { | ||
"enabled": "true", | ||
"updatePolicy": "always", | ||
"checksumPolicy": "fail" | ||
}, | ||
"snapshots": { | ||
"enabled": "true", | ||
"updatePolicy": "always", | ||
"checksumPolicy": "fail" | ||
} | ||
} | ||
] | ||
servers: > | ||
[ | ||
{ | ||
"id": "github", | ||
"username": "${env.USER}", | ||
"password": "${{ secrets.GITHUB_TOKEN }}", | ||
"configuration": { | ||
"httpConfiguration": { | ||
"all": { | ||
"usePreemptive": "true" | ||
} | ||
} | ||
} | ||
} | ||
] | ||
active_profiles: > | ||
[ | ||
"github" | ||
] | ||
output_file: .m2/settings.xml | ||
- name: Publish package | ||
run: mvn --batch-mode deploy | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |