Skip to content

Commit 6d68ab6

Browse files
committed
Add basic android workflow
1 parent 2e69e6e commit 6d68ab6

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

.github/workflows/android.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
tags: [ 'v*' ]
7+
8+
jobs:
9+
lint:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
submodules: true
15+
16+
- uses: actions/setup-java@v1
17+
with:
18+
java-version: 1.8
19+
20+
- run: ./gradlew lint --stacktrace
21+
22+
apk:
23+
needs: test
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v2
27+
with:
28+
submodules: true
29+
30+
- uses: actions/setup-java@v1
31+
with:
32+
java-version: 1.8
33+
34+
- run: ./gradlew assembleRelease --stacktrace
35+
36+
- uses: actions/upload-artifact@v1
37+
with:
38+
name: apk
39+
path: app/build/outputs/apk/release/app-release.apk
40+
41+
release:
42+
if: startsWith(github.ref, 'refs/tags/v')
43+
needs: apk
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/download-artifact@v2
47+
with:
48+
name: apk
49+
50+
- id: create_release
51+
uses: actions/create-release@v1
52+
env:
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
with:
55+
tag_name: ${{ github.ref }}
56+
release_name: Release ${{ github.ref }}
57+
58+
- uses: actions/[email protected]
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
with:
62+
upload_url: ${{ steps.create_release.outputs.upload_url }}
63+
asset_path: app-release.apk
64+
asset_name: ImageMixer.apk
65+
asset_content_type: application/zip

0 commit comments

Comments
 (0)