Skip to content

enforce java 17 requirement #7

enforce java 17 requirement

enforce java 17 requirement #7

name: Publish to GitHub Packages and maven central
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Set up Java for publishing to Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
server-username: MAVEN_USERNAME # env variable for username in deploy
server-password: MAVEN_PASSWORD # env variable for token or password in deploy
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Set up Maven 🍮
uses: stCarolas/setup-maven@v4.5

Check failure on line 24 in .github/workflows/publish_package.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish_package.yml

Invalid workflow file

You have an error in your yaml syntax on line 24
with:
maven-version: 3.9.3
- name: Publish to Maven Central Repository
# working-directory: k3-al/fr.inria.diverse.k3.al.root
run: mvn --batch-mode deploy -P ossrh-distribution --file k3-al/fr.inria.diverse.k3.al.root/pom.xml
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
- name: Set up Java for publishing to GitHub Packages
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Publish package on github registry
run: mvn --batch-mode deploy -P github-distribution --file k3-al/fr.inria.diverse.k3.al.root/pom.xml -DskipTests=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}