Skip to content

Merge pull request #5 from OCTRI/authlib-154 #16

Merge pull request #5 from OCTRI/authlib-154

Merge pull request #5 from OCTRI/authlib-154 #16

Workflow file for this run

---
name: build
on:
push:
branches:
- '**'
pull_request:
types:
- opened
- edited
workflow_dispatch:
jobs:
build-java-source:
name: build jar file
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Java build environmant
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
- name: Build with Maven
run: mvn package
- name: Get Version from POM
id: get-version
run: |
version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "version=$version" >> $GITHUB_ENV
- name: Publish SNAPSHOT JAR
if: github.ref == 'refs/heads/main' && contains(env.version, '-SNAPSHOT')
run: mvn deploy -DskipTests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}