File tree Expand file tree Collapse file tree 1 file changed +60
-0
lines changed Expand file tree Collapse file tree 1 file changed +60
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Android CI
2+
3+ env :
4+ # The name of the main module repository
5+ main_project_module : Arms-App
6+
7+ on :
8+ # Triggers the workflow on push or pull request events but only for default and protected branches
9+ push :
10+ branches : [ dev ]
11+ pull_request :
12+ branches : [ dev ]
13+
14+ # Allows you to run this workflow manually from the Actions tab
15+ workflow_dispatch :
16+
17+ jobs :
18+ build :
19+
20+ runs-on : ubuntu-latest
21+
22+ steps :
23+
24+ - run : echo "### kickoff build project ${{ github.repository }} :rocket:" >> $GITHUB_STEP_SUMMARY
25+ - uses : actions/checkout@v4
26+
27+ # Set Current Date As Env Variable
28+ - name : Set current date as env variable
29+ run : echo "date_today=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
30+
31+ - name : Build using stored timestamp
32+ run : echo "Building at $date_today"
33+
34+ # Set Repository Name As Env Variable
35+ - name : Set repository name as env variable
36+ run : echo "repository_name=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV
37+
38+ - name : Set Up JDK
39+ uses : actions/setup-java@v4
40+ with :
41+ distribution : ' zulu' # See 'Supported distributions' for available options
42+ java-version : ' 17'
43+ cache : ' gradle'
44+
45+ - name : Change wrapper permissions
46+ run : chmod +x ./gradlew
47+
48+ # Run Tests Build
49+ - name : Run gradle tests
50+ run : ./gradlew test
51+
52+ # Run Build Project
53+ - name : Build gradle project
54+ run : ./gradlew build
55+
56+ - name : Upload a Build Artifact
57+ uses : actions/upload-artifact@v4
58+ with :
59+ name : ArmsApp.apk
60+ path : app/build/outputs/apk/debug/app-debug.apk
You can’t perform that action at this time.
0 commit comments