Skip to content

Commit a6d0589

Browse files
authored
Merge pull request #7 from Fandroid745/dev
feat: Add github actions workflow
2 parents 5e1f16b + e97bec2 commit a6d0589

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

workflows/release.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Name of the workflow
2+
name: Android CI
3+
4+
# Controls when the workflow will run
5+
on:
6+
push:
7+
branches: [ "main" ]
8+
tags: [ "v*" ]
9+
10+
# This block grants the necessary permissions to the GITHUB_TOKEN
11+
permissions:
12+
contents: write # This is the crucial line you need to add
13+
14+
# A workflow run is made up of one or more jobs
15+
jobs:
16+
build:
17+
# The type of runner that the job will run on
18+
runs-on: ubuntu-latest
19+
20+
# The steps represent a sequence of tasks that will be executed
21+
steps:
22+
# Checks-out your repository
23+
- uses: actions/checkout@v4
24+
25+
# Sets up the Java Development Kit (JDK)
26+
- name: Set up JDK 17
27+
uses: actions/setup-java@v4
28+
with:
29+
java-version: '17'
30+
distribution: 'temurin'
31+
cache: 'gradle'
32+
33+
# Grants execute permission for the Gradle wrapper
34+
- name: Grant execute permission for gradlew
35+
run: chmod +x gradlew
36+
37+
# Builds the release APK
38+
- name: Build release APK
39+
run: ./gradlew assembleRelease
40+
41+
42+
43+
# Uploads the generated APK to a new GitHub Release
44+
- name: Upload to GitHub Release
45+
uses: softprops/action-gh-release@v1
46+
if: startsWith(github.ref, 'refs/tags/')
47+
with:
48+
files: app/release/app-release.apk

0 commit comments

Comments
 (0)