Skip to content

Commit

Permalink
adjusting the publish scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
psenin-sanofi committed Dec 27, 2021
1 parent 81f4862 commit af72498
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 4 deletions.
1 change: 0 additions & 1 deletion .github/workflows/maven.yml
Expand Up @@ -11,7 +11,6 @@ on:

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down
35 changes: 32 additions & 3 deletions .github/workflows/publish.yml
Expand Up @@ -3,15 +3,36 @@ on:
release:
types: [created]
jobs:
publish:

build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
java: [ 8, 11 ]
env:
OS: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- name: Set up Java ${{ matrix.java }}
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: maven

- name: Build with Maven
run: mvn -B package --file pom.xml

publish_github:
runs-on: ubuntu-latest
needs: build
permissions:
contents: read
packages: write
steps:

- uses: actions/checkout@v2

- name: Set up Java for publishing to GitHub Packages
uses: actions/setup-java@v2
with:
Expand All @@ -23,6 +44,14 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish_maven_central:
runs-on: ubuntu-latest
needs: build
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- name: Set up Java for publishing to Maven Central Repository
uses: actions/setup-java@v2
with:
Expand Down

0 comments on commit af72498

Please sign in to comment.