Skip to content

Commit

Permalink
Merge pull request #25 from rikkarth/dev
Browse files Browse the repository at this point in the history
maven.yml Update
  • Loading branch information
rikkarth authored Dec 8, 2023
2 parents 371d39c + 51d2beb commit 44111fc
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,15 @@ jobs:
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git config --global user.name "${GITHUB_ACTOR}"
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "Creating release for version $VERSION"
git tag -a "$VERSION" -m "Release $VERSION"
git push origin "$VERSION"
publish:
publish-nexus:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
Expand All @@ -75,12 +77,25 @@ jobs:
gpg_passphrase: ${{ secrets.gpg_passphrase }}
nexus_username: ${{ secrets.nexus_username }}
nexus_password: ${{ secrets.nexus_password }}

publish-github:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up Java for publishing to GitHub Packages
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'corretto'
- name: Publish to GitHub Packages
run: mvn --batch-mode deploy -Pgithub
with:
gpg_private_key: ${{ secrets.gpg_private_key }}
gpg_passphrase: ${{ secrets.gpg_passphrase }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn --batch-mode deploy -Pgithub

0 comments on commit 44111fc

Please # to comment.