-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (41 loc) · 1.06 KB
/
android.yml
File metadata and controls
49 lines (41 loc) · 1.06 KB
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
name: Android CI/CD
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew assembleDebug
- name: Generate Tag and Release
id: tag_version
run: |
TAG_NAME="v$(date +'%Y.%m.%d-%H%M%S')"
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
git tag $TAG_NAME
git push origin $TAG_NAME
- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.TAG_NAME }}
name: Release ${{ env.TAG_NAME }}
draft: false
prerelease: false
files: |
app/build/outputs/apk/debug/app-debug.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}