update actions

pull/6/head
fengyuecanzhu 3 years ago
parent a19608643f
commit 61120904e2
  1. 48
      .github/workflows/android.yml
  2. 35
      .github/workflows/reader.yml
  3. 3
      .gitmodules
  4. 10
      .idea/runConfigurations.xml
  5. 1
      .idea/vcs.xml
  6. 4
      app/build.gradle
  7. 1
      keystore

@ -1,48 +0,0 @@
name: Android CI
on:
release:
types: [published]
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up JDK 1.8
uses: actions/setup-java@v2
with:
java-version: '1.8'
distribution: 'adopt'
# 获取打包秘钥
- name: Checkout Android Keystore
uses: actions/checkout@v2
with:
repository: 存储android打包用的key的仓库(格式:用户名/仓库名)
token: ${{ secrets.TOKEN }} # 连接仓库的token,需要单独配置
path: keystore # 仓库的根目录名
# 打包release
- name: Build with Gradle
run: bash ./gradlew assembleRelease
# 创建release
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.ref }}
release_name: FYReader_v${{ github.ref }}
draft: false
prerelease: false
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build

@ -0,0 +1,35 @@
name: Android CI
on:
release:
types: [published]
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# 获取打包秘钥
- name: Checkout Android Keystore
uses: actions/checkout@v2
with:
repository: fengyuecanzhu/Key
token: ${{ secrets.KEY_TOKEN }} # 连接仓库的token,需要单独配置
path: keystore # 仓库的根目录名
# 打包release
- name: Build With Gradle
run: |
echo "开始进行release构建"
chmod +x gradlew
./gradlew assembleAppRelease --parallel
- name: Upload App To Artifact
uses: actions/upload-artifact@v2
with:
name: fyreader apk
path: ${{ github.workspace }}/app/build/outputs/apk/app/release/*.apk

3
.gitmodules vendored

@ -1,3 +0,0 @@
[submodule "keystore"]
path = keystore
url = https://github.com/fengyuecanzhu/Key.git

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
</set>
</option>
</component>
</project>

@ -2,6 +2,5 @@
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/keystore" vcs="Git" />
</component>
</project>

@ -89,16 +89,20 @@ android {
ndk {
abiFilters "x86", "armeabi", "armeabi-v7a"
}
if (keyPropsFile.exists()) {
signingConfig signingConfigs.myConifg
}
}
debug {
ndk {
abiFilters "x86", "armeabi", "armeabi-v7a"
}
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
if (keyPropsFile.exists()) {
signingConfig signingConfigs.myConifg
}
}
android.applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "${name}v${defaultConfig.versionName}.apk"

@ -1 +0,0 @@
Subproject commit d46d54c2573c77713809f1061aef135c305bc9f4
Loading…
Cancel
Save