Skip to content

Maven_Publish_package #7

Maven_Publish_package

Maven_Publish_package #7

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: Clone Submodule
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: git submodule update --init --recursive
- 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 }}