-
Notifications
You must be signed in to change notification settings - Fork 17
73 lines (61 loc) · 2.24 KB
/
publish_inkSDK_ado.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: publish-inkSDK-ado
# This workflow builds and publishes in ADO the Ink SDK artifact.
on:
push:
tags:
- 'ink*'
workflow_dispatch:
inputs:
name:
description: 'Triggers publication to ADO - inkSDK'
home:
description: 'location'
required: false
jobs:
publish-inkSDK:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
# Base64 decodes and pipes the GPG key content into the secret file
- name: Prepare environment
env:
SIGNING_SECRET_KEY: ${{ secrets.SIGNING_SECRET_KEY }}
SIGNING_SECRET_FILE: ${{ secrets.SIGNING_SECRET_FILE }}
run: |
git fetch --unshallow
sudo bash -c "echo '$SIGNING_SECRET_KEY' | base64 -d > '$SIGNING_SECRET_FILE'"
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: clean
run: ./gradlew :inksdk:ink:clean
# Builds the release artifacts of the library
- name: Release build
run: ./gradlew :inksdk:ink:assembleRelease
# Generates other artifacts
- name: Source jar
run: ./gradlew :inksdk:ink:androidSourcesJar
# Generates docs artifact
- name: Docs jar
run: ./gradlew :inksdk:ink:dokkaHtmlJar
# Runs upload to ADO
- name: Publish to ADO
run: ./gradlew :inksdk:ink:publishSurfaceDuoSDKPublicationToADORepository --max-workers 1
env:
ADO_URL: ${{ secrets.ADO_URL }}
ADO_USER: ${{ secrets.ADO_USER }}
ADO_PASSWD: ${{ secrets.ADO_PASSWD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_SECRET_FILE: ${{ secrets.SIGNING_SECRET_FILE }}