Merge pull request #287 from 10bits/master

默认checkout本仓库最新代码构建,不再clone远端代码
pull/293/head
kunfei 4 years ago committed by GitHub
commit 7372d8bc0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. BIN
      .github/workflows/legado.jks
  2. 39
      .github/workflows/legado.yml

Binary file not shown.

@ -8,6 +8,8 @@ on:
- '3.*' - '3.*'
watch: watch:
types: [started] types: [started]
schedule:
- cron: '0 4 * * *'
jobs: jobs:
build: build:
@ -20,32 +22,31 @@ jobs:
uses: actions/setup-java@v1 uses: actions/setup-java@v1
with: with:
java-version: 1.8 java-version: 1.8
- name: install git - name: clear 18PlusList.txt
run: | run: |
sudo apt-get update echo "清空18PlusList.txt"
sudo apt-get -y install git echo "">$GITHUB_WORKSPACE/app/src/main/assets/18PlusList.txt
- name: clone code
run: |
git clone https://github.com/gedoor/legado.git /opt/legado
echo "ojbk">/opt/legado/app/src/main/assets/18PlusList.txt
- name: release apk sign - name: release apk sign
run: | run: |
git clone https://github.com/10bits/gedoor-Build.git /opt/gedoor-Build echo "给apk增加签名"
cp /opt/gedoor-Build/.github/workflows/legado.jks /opt/legado/app/legado.jks cp $GITHUB_WORKSPACE/.github/workflows/legado.jks $GITHUB_WORKSPACE/app/legado.jks
sed '$a\RELEASE_STORE_FILE=./legado.jks' /opt/legado/gradle.properties -i sed '$a\RELEASE_STORE_FILE=./legado.jks' $GITHUB_WORKSPACE/gradle.properties -i
sed '$a\RELEASE_KEY_ALIAS=legado' /opt/legado/gradle.properties -i sed '$a\RELEASE_KEY_ALIAS=legado' $GITHUB_WORKSPACE/gradle.properties -i
sed '$a\RELEASE_STORE_PASSWORD=gedoor_legado' /opt/legado/gradle.properties -i sed '$a\RELEASE_STORE_PASSWORD=gedoor_legado' $GITHUB_WORKSPACE/gradle.properties -i
sed '$a\RELEASE_KEY_PASSWORD=gedoor_legado' /opt/legado/gradle.properties -i sed '$a\RELEASE_KEY_PASSWORD=gedoor_legado' $GITHUB_WORKSPACE/gradle.properties -i
sed "s/'.release'/'.releaseA'/" /opt/legado/app/build.gradle -i - name: apk live together
sed 's/.release/.releaseA/g' /opt/legado/app/google-services.json -i run: |
- name: Build with Gradle echo "设置apk共存"
sed "s/'.release'/'.releaseA'/" $GITHUB_WORKSPACE/app/build.gradle -i
sed 's/.release/.releaseA/' $GITHUB_WORKSPACE/app/google-services.json -i
- name: build with gradle
run: | run: |
cd /opt/legado echo "开始进行release构建"
chmod +x gradlew chmod +x gradlew
./gradlew assembleRelease ./gradlew aR
- name : upload apk - name : upload apk
uses: actions/upload-artifact@master uses: actions/upload-artifact@master
if: always() if: always()
with: with:
name: legado apk name: legado apk
path: /opt/legado/app/build/outputs/apk/app/release path: ${{ github.workspace }}/app/build/outputs/apk/app/release

Loading…
Cancel
Save