Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Flisar authored and Michael Flisar committed Nov 2, 2023
1 parent 30558de commit 9cece61
Showing 1 changed file with 34 additions and 25 deletions.
59 changes: 34 additions & 25 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,38 @@ jobs:
runs-on: ubuntu-latest
steps:

# 1) Checkout
- uses: actions/checkout@v3

# 2) Setup JAVA
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

# 3) gradlew permissions
- name: Grant execute permission for gradlew
run: chmod +x gradlew

# 4) build debug apk
- name: Build with Gradle
run: ./gradlew assembleDebug --stacktrace

# 5) upload debug apk
- name: Upload APK Build Artifact
uses: actions/upload-artifact@master
with:
name: demo
path: demo/outputs/apk/debug/demo-debug.apk
# Set Current Date As Env Variable
- name: Set current date as env variable
run: echo "date_today=$(date +'%Y-%m-%d')" >> $GITHUB_ENV

# Set Repository Name As Env Variable
- name: Set repository name as env variable
run: echo "repository_name=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV


# 1) Checkout
- uses: actions/checkout@v3

# 2) Setup JAVA
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

# 3) gradlew permissions
- name: Grant execute permission for gradlew
run: chmod +x gradlew

# 4) build debug apk
- name: Build with Gradle
run: ./gradlew assembleDebug --stacktrace

# 5) upload debug apk
- name: Upload APK Build Artifact
uses: actions/upload-artifact@master
with:
name: ${{ env.date_today }} - ${{ env.repository_name }} - APK(s) debug generated
path: ${{ env.main_project_module }}/build/outputs/apk/debug/

0 comments on commit 9cece61

Please sign in to comment.