-
Notifications
You must be signed in to change notification settings - Fork 0
153 lines (129 loc) · 4.71 KB
/
development-ci.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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
name: Android - Build & Publish Release APK - DEV
on:
push:
branches:
- development
- '!feature*'
- '!feature/*'
- '!fix*'
- '!fix/*'
- '!hotfix*'
- '!hotfix/*'
- '!feat*'
- '!feat/*'
pull_request:
branches:
- development
- '!feature*'
- '!feature/*'
- '!fix*'
- '!fix/*'
- '!hotfix*'
- '!hotfix/*'
- '!feat*'
- '!feat/*'
jobs:
Test:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Take package.json version
id: package_version
run: echo ::set-output name=package_version::$(node -p "require('./package.json').version")
- name: Install dependencies
run: npm config set legacy-peer-deps=true && npm install --legacy-peer-deps
# - name: Run Jests tests
# run: npm run test
Release_Code:
needs: Test
runs-on: ubuntu-latest
steps:
- name: Get the SHA of the latest commit
id: sha
run: echo ::set-output name=sha::$(git rev-parse HEAD)
- name: Set current date
id: date
run: echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
DATE: ${{ env.DATE }}
with:
tag_name: "v1-${{ github.run_number }}"
release_name: DEV - Code Release ${{ github.run_number }} - ${{ env.DATE }} - ${{ github.sha }}
body: |
This code release is an automated release created by GitHub Actions.
Commit messages:
${{ join(github.event.commits.*.message, '\n') }}
draft: false
prerelease: false
Publish_Bundle:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 16
- name: Install dependencies
run: npm config set legacy-peer-deps=true && npm install --legacy-peer-deps
- name: Cache Gradle
uses: actions/cache@v2
with:
path: ~/.gradle/caches/modules-2
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Cache Gradle Wrapper
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: Cache Gradle Dependencies
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-caches-
- name: Make Gradlew Executable
run: cd android && chmod +x ./gradlew
- name: Build Android App Release
run: |
cd android && ./gradlew --warning-mode all bundleRelease
env:
GIPHY_API_KEY: ${{ secrets.GIPHY_API_KEY }}
GIPHY_PATH: ${{ secrets.GIPHY_PATH }}
TMDB_API_KEY: ${{ secrets.TMDB_API_KEY }}
TMDB_PATH: ${{ secrets.TMDB_PATH }}
API_LINK: ${{ secrets.API_LINK_DEV }}
- name: Sign Android release
id: sign_app
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: './android/app/build/outputs/bundle/release'
signingKeyBase64: ${{ secrets.KEYSTORE_PATH }}
keyStorePassword: ${{ secrets.KEYSTORE_PASSWORD }}
alias: ${{ secrets.KEY_ALIAS }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Publish Release Bundle
uses: actions/[email protected]
with:
name: peelApp.aab
path: ./android/app/build/outputs/bundle/release/app-release.aab
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
KEYSTORE_PATH: ${{ secrets.KEYSTORE_PATH }}
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
APP_FOLDER: app
APP_NAME: peelApp