Skip to content

Commit 985a91f

Browse files
committed
- Added workflows
1 parent 491cfa1 commit 985a91f

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
name: Build project after push
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
- name: set up JDK 11
12+
uses: actions/setup-java@v3
13+
with:
14+
java-version: '11'
15+
distribution: 'temurin'
16+
cache: gradle
17+
18+
- name: Grant execute permission for gradlew
19+
run: chmod +x gradlew
20+
- name: Build with Gradle
21+
run: ./gradlew build
22+
- name: Build debug APK
23+
run: bash ./gradlew assembleDebug --stacktrace
24+
25+
- name: Check files
26+
run: ls -al app/build/outputs/apk/debug
27+
28+
- name: Create Release
29+
id: create_release
30+
uses: actions/create-release@v1
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.TOKEN }}
33+
with:
34+
tag_name: ${{ github.run_number }}
35+
release_name: ${{ github.event.repository.name }} v${{ github.run_number }}
36+
37+
- name: Upload Release APK
38+
id: upload_release_asset
39+
uses: actions/[email protected]
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.TOKEN }}
42+
with:
43+
upload_url: ${{ steps.create_release.outputs.upload_url }}
44+
asset_path: app/build/outputs/apk/debug/app-debug.apk
45+
asset_name: ${{ github.event.repository.name }}.apk
46+
asset_content_type: application/vnd.android.package-archive

0 commit comments

Comments
 (0)