generated from easybangumiorg/EasyBangumi-ExtensionBase
-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (45 loc) · 1.54 KB
/
release.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
name: release
on:
push:
tags:
- '**'
workflow_dispatch:
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3.5.2
- name: Setup Java JDK
uses: actions/setup-java@v1.4.4
with:
java-version: 17
- name: Build
run: |
chmod +x ./gradlew
./gradlew :extension-app:assemble
- name: Setup build tool version variable
shell: bash
run: |
BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1)
echo "BUILD_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV
echo Last build tool version is: $BUILD_TOOL_VERSION
- name: sign-apk
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: extension-app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PWD }}
keyPassword: ${{ secrets.KEY_PWD }}
env:
# override default build-tools version (29.0.3) -- optional
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOL_VERSION }}
- name: rename-apk
run: |
mv extension-app/build/outputs/apk/release/extension-app-release-unsigned-signed.apk extension-app-${{ github.ref_name }}.apk
- name: Release
run: |
gh release create -d ${{ github.ref_name }} extension-app-${{ github.ref_name }}.apk
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}