-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (46 loc) · 1.37 KB
/
cd.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
name: CD
on:
push:
branches:
- 'master'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build_and_tag:
env:
GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
GIT_USER_NAME: ${{ secrets.GIT_USER_NAME }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build Android application
run: ./gradlew clean build
- name: Get application's version
run: echo "APP_VERSION=$( ./gradlew -q printVersionName )" >> $GITHUB_ENV
- name: Upload APKs
uses: actions/upload-artifact@v2
with:
name: apks-${{ env.APP_VERSION }}
path: app/build/**/*.apk
- name: Set Git identity
run: |
git config user.email "$GIT_USER_EMAIL"
git config user.name "$GIT_USER_NAME"
- name: Create tag
run: git tag -a "v$APP_VERSION-rc" -m "Release candidate v$APP_VERSION"
- name: Push tag to repository
run: git push --tags origin
generate_docs:
needs: build_and_tag
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Generate Kotlin documentation with Dokka
run: ./gradlew dokkaHtml
- name: Upload documentation
uses: actions/upload-artifact@v2
with:
name: documentation
path: ./**/build/dokka