Skip to content

Commit

Permalink
Merge pull request #3 from OCTRI/AUTHLIB-153
Browse files Browse the repository at this point in the history
AUTHLIB-153: Adding workflow to publish SNAPSHOT jars
  • Loading branch information
vijetmuley3 authored Dec 6, 2024
2 parents 945aa8a + 2b62813 commit 5b44244
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out repository
uses: actions/checkout@v4
Expand All @@ -29,4 +30,16 @@ jobs:

- 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 }}

0 comments on commit 5b44244

Please sign in to comment.