This repository has been archived by the owner on Apr 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
99 lines (91 loc) · 2.96 KB
/
master.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: AndroidSDK_MasterCI
on:
push:
branches:
- master
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build_and_test:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v3
- name: set up JDK 1.8
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
- name: Install git-crypt
run: |
brew install gnupg
gpg --list-keys
- name: Import public GPG key
run: |
gpg --keyserver keyserver.ubuntu.com --recv-keys ${{ secrets.SIGNING_GNUPG_KEYID }}
gpg --list-keys
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.SIGNING_GNUPG_SECRETKEY }}
passphrase: ${{ secrets.SIGNING_GNUPG_PASSWORD }}
- name: Test gpg key
run: |
touch test.txt
gpg -ab test.txt
gpg --verify test.txt.asc
- name: Restore setting values to gradle.properties
env:
GPG_KEY_ID: ${{ secrets.SIGNING_GNUPG_KEYID }}
GPG_HOMEDIR: ${{ secrets.SIGNING_GNUPG_HOMEDIR }}
GPG_PASSPHRASE: ${{ secrets.SIGNING_GNUPG_PASSWORD }}
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
shell: bash
run: |
echo "signing.gnupg.executable=gpg" >> ./gradle.properties
echo "signing.gnupg.useLegacyGpg=true" >> ./gradle.properties
echo "signing.gnupg.homeDir=$GPG_HOMEDIR" >> ./gradle.properties
echo "signing.gnupg.keyId=$GPG_KEY_ID" >> ./gradle.properties
echo "signing.gnupg.password=$GPG_PASSPHRASE" >> ./gradle.properties
echo "ossrhUsername=$MAVEN_USERNAME" >> ./gradle.properties
echo "ossrhPassword=$MAVEN_PASSWORD" >> ./gradle.properties
cat ./gradle.properties
- run: |
rm -r docs/
mkdir docs
- name: build and test Android SDK
run: ./gradlew build test --continue --info
- run: mv build/docs/javadoc/* docs/
- name: zip docs
run: zip -r docs.zip docs/
- name: Archive docs
uses: actions/upload-artifact@v3
with:
name: docs
path: docs.zip
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Publish to Nexus repository
run: ./gradlew uploadArchive
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: './docs'
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build_and_test
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1