-
Notifications
You must be signed in to change notification settings - Fork 622
39 lines (35 loc) · 1.71 KB
/
pytorch_native_staging.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
name: PyTorch staging publish
on:
# To trigger this workflow manually, you can use the following curl command:
# curl -XPOST -u "USERNAME:PERSONAL_TOKEN" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/awslabs/djl/dispatches --data '{"event_type": "pytorch-staging-pub"}'
# Make sure you create your personal token with repo access. Follow steps in
# https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line
# to create your personal token.
repository_dispatch:
types: [pytorch-staging-pub]
jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- 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@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Download native binaries
run: ./gradlew :pytorch:pytorch-native:dPTNL
- name: Publish to staging repository
working-directory: pytorch/pytorch-native
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 }}