Skip to content

Publish package to the Package Repository #8

Publish package to the Package Repository

Publish package to the Package Repository #8

Workflow file for this run

name: Publish package to the Package Repository
on:
workflow_dispatch:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up the Package Repository
uses: actions/setup-java@v3
with:
java-version: '16'
distribution: 'adopt'
server-id: cloudsmith
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Publish package
run: mvn deploy
env:
MAVEN_USERNAME: ${{ secrets.CLOUDSMITH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.CLOUDSMITH_TOKEN }}