Skip to content

Merge pull request #121 from glelouet/fix_build_artifacts #8

Merge pull request #121 from glelouet/fix_build_artifacts

Merge pull request #121 from glelouet/fix_build_artifacts #8

Workflow file for this run

# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path
name: Maven deploy Snapshots
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 17 ]
name: Java ${{ matrix.java }} build
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish to the Maven Central Repository
if: github.repository == 'phax/jcodemodel'
run: mvn --batch-mode --update-snapshots -ntp -P release-snapshot deploy
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}