This repository was archived by the owner on Mar 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (56 loc) · 1.84 KB
/
build_release.yml
File metadata and controls
70 lines (56 loc) · 1.84 KB
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
61
62
63
64
65
66
67
68
69
70
name: Build and Release APK
on:
workflow_dispatch:
inputs:
tagname:
description: "Release version (e.g., v1.0.0)"
required: true
default: "v1.0.0"
env:
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
concurrency:
group: ${{ github.workflow }}-${{ github.event.inputs.tagname }}
cancel-in-progress: true
jobs:
create-release-tag:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create tag
run: |
git tag ${{ github.event.inputs.tagname }}
git push origin ${{ github.event.inputs.tagname }}
publish-github-release:
name: "Publish GitHub Release"
runs-on: ubuntu-latest
needs: create-release-tag
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout keystore repository
uses: actions/checkout@v4
with:
repository: ${{ secrets.KEY_STORE_GIT_REPOSITORY }}
token: ${{ secrets.GIT_ACCESS_TOKEN }}
path: app/keystore
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "adopt"
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build APK with Gradle
run: ./gradlew assembleRelease
- name: Upload APK to GitHub Release
uses: svenstaro/upload-release-action@v2
with:
release_name: "Release ${{ github.event.inputs.tagname }}"
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.inputs.tagname }}
draft: true
file: app/build/outputs/apk/release/app-release.apk
asset_name: PixivCompose-${{ github.event.inputs.tagname }}.apk