Merge branch 'ShiftHackZ:master' into master #5
This file contains 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: Build and Compile APK | ||
"on": | ||
push: | ||
branches: | ||
- master | ||
- main | ||
jobs: | ||
build_apk: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 17 | ||
distribution: 'adopt' | ||
- name: Build APK | ||
run: | | ||
chmod +x ./gradlew | ||
./gradlew assembleRelease | ||
- name: Upload APK | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: app-release.apk | ||
path: app/build/outputs/apk/release/app-release.apkname: Build and Release APK | ||
"on": | ||
push: | ||
branches: | ||
- main | ||
- master | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 17 | ||
distribution: 'adopt' | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x ./gradlew | ||
- name: Resolve dependencies | ||
run: ./gradlew dependencies | ||
- name: Build release APK | ||
run: ./gradlew assembleRelease | ||
- name: Upload APK | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: app-release | ||
path: app/build/outputs/apk/release/*.apk | ||
release: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: app-release | ||
path: app/build/outputs/apk/release | ||
- name: Create Release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
files: app/build/outputs/apk/release/*.apk |