-
-
Notifications
You must be signed in to change notification settings - Fork 5
48 lines (38 loc) · 1.25 KB
/
release.yml
File metadata and controls
48 lines (38 loc) · 1.25 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
# Name of the workflow
name: Android CI
# Controls when the workflow will run
on:
push:
branches: [ "main" ]
tags: [ "v*" ]
# This block grants the necessary permissions to the GITHUB_TOKEN
permissions:
contents: write # This is the crucial line you need to add
# A workflow run is made up of one or more jobs
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# The steps represent a sequence of tasks that will be executed
steps:
# Checks-out your repository
- uses: actions/checkout@v4
# Sets up the Java Development Kit (JDK)
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'
# Grants execute permission for the Gradle wrapper
- name: Grant execute permission for gradlew
run: chmod +x gradlew
# Builds the release APK
- name: Build release APK
run: ./gradlew assembleRelease
# Uploads the generated APK to a new GitHub Release
- name: Upload to GitHub Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: app/release/app-release.apk