-
Notifications
You must be signed in to change notification settings - Fork 622
55 lines (51 loc) · 2.12 KB
/
serving_publish.yml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Serving publish
on:
schedule:
- cron: '0 12 * * *'
workflow_dispatch:
inputs:
mode:
description: 'staging/snapshot, default is snapshot'
required: true
default: 'snapshot'
repo-id:
description: 'staging repository id for djl api packages'
required: false
default: ''
jobs:
publish:
if: github.repository == 'deepjavalibrary/djl'
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
repository: deepjavalibrary/djl-serving
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
# Enable gradle cache: https://github.com/actions/cache/blob/master/examples.md#java---gradle
- uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Publish to snapshot repository
if: ${{ github.event.inputs.mode == '' || github.event.inputs.mode == 'snapshot' }}
run: ./gradlew publish -Psnapshot
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_signingKey }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_signingPassword }}
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.ORG_GRADLE_PROJECT_ossrhUsername }}
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.ORG_GRADLE_PROJECT_ossrhPassword }}
DJL_STAGING: ${{ github.event.inputs.repo-id }}
- name: Publish to staging repository
if: ${{ github.event.inputs.mode == 'staging' }}
run: ./gradlew publish -Pstaging
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_signingKey }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_signingPassword }}
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.ORG_GRADLE_PROJECT_ossrhUsername }}
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.ORG_GRADLE_PROJECT_ossrhPassword }}
DJL_STAGING: ${{ github.event.inputs.repo-id }}