Skip to content

Commit

Permalink
[feature]增加GitHub Actions打包支持
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyD666 committed Jul 11, 2022
1 parent 7d444ca commit 1f2ec1d
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 7 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/pre_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Pre-Release

# 触发器
on:
workflow_dispatch:
push:
pull_request:

jobs:
build:

runs-on: ubuntu-latest
# 设置JDK为11
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
- name: Checkout Secret
uses: actions/checkout@v3
with:
repository: ${{ secrets.SECRET_REPO }}
token: ${{ secrets.TOKEN }} # 连接仓库的Token
path: secret
# 准备secret文件
- name: Copy Secret Files
run: |
cd secret/Imomoe
cp key.jks ../..
cp secret.gradle ../..
cp notice.html ../../app/src/main/res/raw
# 清理secret文件
- name: Clean Temp Secret Files
run: |
rm -rf ./secret
# 打包
- name: Build with Gradle
run: |
bash ./gradlew assembleGithub
# 存档打包的文件
- name: Upload Pre-Release Apk
uses: actions/upload-artifact@v3
with:
name: Pre-Release Apk
path: app/build/outputs/apk/Github/release/*.apk
14 changes: 7 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ kotlin.code.style=official
android.enableResourceOptimizations=true

# clash代理
systemProp.socks.proxyHost=127.0.0.1
systemProp.socks.proxyPort=7890

systemProp.https.proxyPort=7890
systemProp.http.proxyHost=127.0.0.1
systemProp.https.proxyHost=127.0.0.1
systemProp.http.proxyPort=7890
#systemProp.socks.proxyHost=127.0.0.1
#systemProp.socks.proxyPort=7890
#
#systemProp.https.proxyPort=7890
#systemProp.http.proxyHost=127.0.0.1
#systemProp.https.proxyHost=127.0.0.1
#systemProp.http.proxyPort=7890

0 comments on commit 1f2ec1d

Please sign in to comment.