forked from microsoft/semantic-kernel-java
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1.1 KB
/
java-publish-package.yml
File metadata and controls
41 lines (34 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Deploy Java Semantic Kernel Package
# Triggers the workflow on merging a PR
on:
pull_request:
types:
- closed
branches: [ "main" ]
permissions:
contents: read
packages: write
jobs:
if_merged:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# Sets up the specified JDK version from the matrix
- uses: actions/setup-java@v4
with:
java-version: 11
distribution: microsoft
cache: maven
- name: Build artifacts
run: ./mvnw -B -DskipTests -Pcompile-jdk8 -P-compile-jdk17 clean deploy --file pom.xml -DaltDeploymentRepository=local::file:///tmp/target/staging-deploy
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: /tmp/target/staging-deploy
- name: Deploy to github packages
run: ./mvnw -B -DskipTests -Pcompile-jdk8 -P-compile-jdk17 -Pgithub-packages clean deploy --file pom.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}