forked from BaltiApps/Pixelify-Google-Photos
-
Notifications
You must be signed in to change notification settings - Fork 6
60 lines (50 loc) · 1.83 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Android CI
on:
workflow_dispatch:
push:
branches: [ "p8pro" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew assembleRelease
- name: Sign APK
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: ${{ github.workspace }}/app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.KEY64 }}
alias: ${{ secrets.KEY }}
keyStorePassword: ${{ secrets.KEY }}
keyPassword: ${{ secrets.KEY }}
env:
BUILD_TOOLS_VERSION: "33.0.1"
- name: Retrieve version
run: echo VERSION=$(echo ${{ github.event.head_commit.id }} | head -c 7) >> $GITHUB_ENV
- name: Rename
run: mv ${{ github.workspace }}/app/build/outputs/apk/release/app-release-unsigned-signed.apk ${{ github.workspace }}/app/build/outputs/apk/release/Pixelify-Google-Photos-${{ env.VERSION }}.apk
- name: Upload built apk
uses: actions/upload-artifact@v3
with:
name: Pixelify-Google-Photos-${{ env.VERSION }}
path: ${{ github.workspace }}/app/build/outputs/apk/release/Pixelify-Google-Photos-${{ env.VERSION }}.apk
- name: Create GitHub Release
id: create_release
uses: Hs1r1us/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ env.VERSION }}
release_name: Pixelify Google Photos ${{ env.VERSION }}
asset_files: ${{ github.workspace }}/app/build/outputs/apk/release/Pixelify-Google-Photos-${{ env.VERSION }}.apk
draft: false
prerelease: false