Merge pull request #9 from Fandroid745/dev #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 |