Skip to content

Commit

Permalink
mvn deploy Publish package
Browse files Browse the repository at this point in the history
  • Loading branch information
homebeaver committed Dec 15, 2024
1 parent 7c311f1 commit a3b9261
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/maven_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish package to the Maven Central Repository

# see https://docs.github.com/de/actions/use-cases-and-examples/publishing-packages/publishing-java-packages-with-maven
on:
release:
types: [created]

jobs:
greeting_job:
runs-on: ubuntu-latest
env:
Greeting: Hello
steps:
- name: ${{ vars.MY_VARIABLE_NAME }}
run: echo "${{ secrets.OSSRH_USERNAME }}" "${{ github.event_name }}"
env:
First_Name: Mona

publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Maven Central Repository
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
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 a3b9261

Please sign in to comment.