Skip to content

Maven_Publish_package #40

Maven_Publish_package

Maven_Publish_package #40

Workflow file for this run

name: Maven_Publish_package
on:
# Triggers the workflow on push or pull request events but only for the main branch
workflow_run:
workflows: ["Java_Maven_Build"]
types:
- completed
on:
branches:
- main
pull_requests:
- merged
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'adopt'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish package
run: cd java && mvn clean deploy -Dmaven.test.skip=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}