fix: Settings.xml #47
Workflow file for this run
This file contains hidden or 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: | |
push: | |
tags: | |
- v** | |
- V** | |
- beta** | |
- test** | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
actions: write | |
checks: write | |
contents: write | |
deployments: write | |
id-token: none | |
issues: write | |
packages: write | |
pages: write | |
pull-requests: write | |
repository-projects: write | |
security-events: write | |
statuses: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Create private-file.key | |
run: echo "${{ secrets.GPGPASSPHRASE }}" > private-file.key | |
- name: Import private-key | |
run: gpg --import private-file.key | |
- name: SettingXML | |
run: | | |
cat << EOF > settings.xml | |
${{ secrets.SETTINGSXML }} | |
EOF | |
ls | |
- name: Publish package | |
run: mvn --batch-mode deploy -s settings.xml | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }} | |
# - name: Maven Central Publish | |
# # You may pin to the exact commit or the version. | |
# # uses: zhoujunlin94/auto_deploy_maven_central@d008e8cc182d799a9fd507164f83c54be0b0a858 | |
# uses: zhoujunlin94/[email protected] | |
# with: | |
# # GPG_PASSPHRASE | |
# GPG_PASSPHRASE: ${{ secrets.GPGPASSPHRASE }} | |