Skip to content
This repository was archived by the owner on Aug 13, 2024. It is now read-only.

Commit 28e6f21

Browse files
authored
Merge pull request #15 from Team-Ladefuchs/build_action
Create build.yml
2 parents 5bf3604 + b4b0431 commit 28e6f21

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/build.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Action ti build the current apk
2+
3+
name: Build APK
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the master branch
8+
push:
9+
branches: [ master ]
10+
pull_request:
11+
branches: [ master ]
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
17+
jobs:
18+
# This workflow contains a single job called "build"
19+
build:
20+
# The type of runner that the job will run on
21+
runs-on: ubuntu-latest
22+
23+
# Steps represent a sequence of tasks that will be executed as part of the job
24+
steps:
25+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
26+
- uses: actions/checkout@v2
27+
28+
# install jdk
29+
- name: Set up JDK 11
30+
uses: actions/setup-java@v1
31+
with:
32+
java-version: 11
33+
34+
# Write API key into build config
35+
- name: Write API key into build config
36+
env:
37+
API_TOKEN: ${{ secrets.API_KEY }}
38+
run: echo apiKey=$API_TOKEN > Ladefuchs/secrets.properties
39+
40+
# Build the android apk
41+
- name: Build fw
42+
working-directory: Ladefuchs
43+
run: |
44+
./gradlew build
45+
46+
# Upload apk to artifact
47+
- name: Upload apk
48+
uses: actions/upload-artifact@v2
49+
with:
50+
name: APKs
51+
path: |
52+
Ladefuchs/app/build/outputs/apk/debug/app-debug.apk
53+
Ladefuchs/app/build/outputs/apk/release/app-release-unsigned.apk
54+

0 commit comments

Comments
 (0)