Use GitHub Action for deploying repo
This commit is contained in:
parent
b2eb532944
commit
303d3e3633
|
@ -1,6 +1,7 @@
|
|||
org.gradle.daemon=false
|
||||
org.gradle.jvmargs=-Xmx5120m
|
||||
org.gradle.workers.max=2
|
||||
org.gradle.parallel=true
|
||||
|
||||
kotlin.incremental=false
|
||||
kotlin.compiler.execution.strategy=in-process
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
rsync -a --delete --exclude .git --exclude .gitignore ../master/repo/ .
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git status
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
git add .
|
||||
git commit -m "Update extensions repo"
|
||||
git push
|
||||
else
|
||||
echo "No changes to commit"
|
||||
fi
|
|
@ -10,7 +10,7 @@ cp -f apk/* repo/apk
|
|||
|
||||
cd repo
|
||||
|
||||
APKS=( ../apk/*".apk"* )
|
||||
APKS=( ../apk/*".apk" )
|
||||
|
||||
for APK in ${APKS[@]}; do
|
||||
FILENAME=$(basename ${APK})
|
|
@ -0,0 +1,35 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
TOOLS="$(ls -d ${ANDROID_HOME}/build-tools/* | tail -1)"
|
||||
|
||||
shopt -s globstar nullglob extglob
|
||||
APKS=( **/*".apk" )
|
||||
|
||||
# Take base64 encoded key input and put it into a file
|
||||
STORE_PATH=$PWD/signingkey.jks
|
||||
rm -f $STORE_PATH && touch $STORE_PATH
|
||||
echo $1 | base64 -d > $STORE_PATH
|
||||
|
||||
STORE_ALIAS=$2
|
||||
export KEY_STORE_PASSWORD=$3
|
||||
export KEY_PASSWORD=$4
|
||||
|
||||
DEST=$PWD/apk
|
||||
rm -rf $DEST && mkdir -p $DEST
|
||||
|
||||
# Sign all of the APKs
|
||||
for APK in ${APKS[@]}; do
|
||||
BASENAME=$(basename $APK)
|
||||
APKNAME="${BASENAME%%+(-release*)}.apk"
|
||||
APKDEST="$DEST/$APKNAME"
|
||||
|
||||
${TOOLS}/zipalign -c -v -p 4 $APK
|
||||
|
||||
cp $APK $APKDEST
|
||||
${TOOLS}/apksigner sign --ks $STORE_PATH --ks-key-alias $STORE_ALIAS --ks-pass env:KEY_STORE_PASSWORD --key-pass env:KEY_PASSWORD $APKDEST
|
||||
done
|
||||
|
||||
rm $STORE_PATH
|
||||
unset KEY_STORE_PASSWORD
|
||||
unset KEY_PASSWORD
|
|
@ -0,0 +1,87 @@
|
|||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
check_wrapper:
|
||||
name: Validate Gradle Wrapper
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Clone repo
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Validate Gradle Wrapper
|
||||
uses: gradle/wrapper-validation-action@v1
|
||||
|
||||
build:
|
||||
name: Build extension repo
|
||||
needs: check_wrapper
|
||||
if: "!startsWith(github.event.head_commit.message, '[SKIP CI]')"
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Cancel previous runs
|
||||
uses: styfle/cancel-workflow-action@0.5.0
|
||||
with:
|
||||
access_token: ${{ github.token }}
|
||||
|
||||
- name: Checkout master branch
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: master
|
||||
path: master
|
||||
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
|
||||
- name: Copy CI gradle.properties
|
||||
run: |
|
||||
cd master
|
||||
mkdir -p ~/.gradle
|
||||
cp .github/runner-files/ci-gradle.properties ~/.gradle/gradle.properties
|
||||
|
||||
- name: Build extensions
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
build-root-directory: master
|
||||
wrapper-directory: master
|
||||
arguments: assembleRelease
|
||||
wrapper-cache-enabled: true
|
||||
dependencies-cache-enabled: true
|
||||
configuration-cache-enabled: true
|
||||
|
||||
- name: Sign APKs
|
||||
if: github.event_name == 'push' && github.repository == 'inorichi/tachiyomi-extensions'
|
||||
run: |
|
||||
cd master
|
||||
./.github/scripts/sign-apks.sh \
|
||||
${{ secrets.SIGNING_KEY }} \
|
||||
${{ secrets.ALIAS }} \
|
||||
${{ secrets.KEY_STORE_PASSWORD }} \
|
||||
${{ secrets.KEY_PASSWORD }}
|
||||
|
||||
- name: Create repo artifacts
|
||||
if: github.event_name == 'push' && github.repository == 'inorichi/tachiyomi-extensions'
|
||||
run: |
|
||||
cd master
|
||||
./.github/scripts/create-repo.sh
|
||||
|
||||
- name: Checkout repo branch
|
||||
if: github.event_name == 'push' && github.repository == 'inorichi/tachiyomi-extensions'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: repo
|
||||
path: repo
|
||||
|
||||
- name: Deploy repo
|
||||
if: github.event_name == 'push' && github.repository == 'inorichi/tachiyomi-extensions'
|
||||
run: |
|
||||
cd repo
|
||||
../master/.github/scripts/commit-repo.sh
|
|
@ -1,34 +0,0 @@
|
|||
name: Pull request build check
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Clone repo
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Validate Gradle Wrapper
|
||||
uses: gradle/wrapper-validation-action@v1
|
||||
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
|
||||
- name: Copy CI gradle.properties
|
||||
run: |
|
||||
mkdir -p ~/.gradle
|
||||
cp .github/runner-files/ci-gradle.properties ~/.gradle/gradle.properties
|
||||
|
||||
- name: Build project
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
arguments: assembleDebug
|
||||
wrapper-cache-enabled: true
|
||||
dependencies-cache-enabled: true
|
||||
configuration-cache-enabled: true
|
48
.travis.yml
48
.travis.yml
|
@ -1,48 +0,0 @@
|
|||
dist: trusty
|
||||
language: android
|
||||
android:
|
||||
components:
|
||||
- build-tools-29.0.3
|
||||
- android-29
|
||||
- extra-android-m2repository
|
||||
- extra-google-m2repository
|
||||
- extra-android-support
|
||||
licenses:
|
||||
- android-sdk-license-.+
|
||||
before_install:
|
||||
- yes | sdkmanager "platforms;android-29" # workaround for accepting the license
|
||||
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
|
||||
openssl aes-256-cbc -K $encrypted_5ba4ee4c096f_key -iv $encrypted_5ba4ee4c096f_iv -in "$PWD/.travis/secrets.tar.enc" -out secrets.tar -d;
|
||||
tar xf secrets.tar;
|
||||
fi
|
||||
- mkdir "$ANDROID_HOME/licenses" || true
|
||||
- echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license"
|
||||
- echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license"
|
||||
script:
|
||||
- .travis/build.sh && .travis/create-repo.sh
|
||||
before_cache:
|
||||
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
|
||||
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.gradle/caches/
|
||||
- $HOME/.gradle/wrapper/
|
||||
- $HOME/.android/build-cache
|
||||
- repo
|
||||
deploy:
|
||||
- provider: pages
|
||||
local-dir: repo
|
||||
target-branch: repo
|
||||
skip-cleanup: true
|
||||
keep-history: true
|
||||
github-token:
|
||||
secure: "SCzQyavQM/bfOjEF+eKp9l0DxiAgsB3v64hYQNb2s/sql4WiL8Mjv9HEAyxBWDfGwUg1cNELWR7s2Y1j/8lCLFaZ5doy7222ZSaRP48MGhpGJQi22jGOqavMNCIcS5EZCjo3OJ9+VWLcx67OIJUQK3KHmnxgeM00luPjzC0a3FiED7/7joU4y9fkQhizfnV6AEZjEma0wUH4+wQxUC+5H71nNDZuz77BO3slZ4TX2YKg9O+QIr5jIjv4GT7dqh+UDQUoMvPXVtORUTI3yOzziwEawc64uMUr+0NtSr9ww+9lg4fs7IeVwkTlDEDbVDFdwvLYAvKlZCqboKygG7NX5Pi11grLYYCrqynXXIsyyBtEyV/fkGt2UcQrMOJRxxI6RkZFuUwozP/DVVO9XiebEfoKKZaQ/ehljveu8+B5S+qsKTO/sFMQJhvi2muhXkUvXeduSjHfqgAxEzrnh6sTR4laI05ICVJVw5j38iUfqOEo4rF+cX11ywgHFzp9RJjYCYhndvobv5vtwk77hrndzVcLlKKlKO4tJDfwg+czRRD7oSX9pT0NeL7tRyD86sNryPMG5pBAfJ4D7knnM9+YmRNJmnsmnu/FGeYlBygUK5IiG05LQ7TfkXiF0wQt7nvlixAiB3ULrso18lqP9U2bGHdjLNaRip3dVxHbrCmP9xY="
|
||||
on:
|
||||
branch: master
|
||||
repo: inorichi/tachiyomi-extensions
|
||||
env:
|
||||
global:
|
||||
- secure: "VvCw9E2eOPoExCKjs4jbGEUJ8hYS6Hw8YzJ4VPqtLa0YJSMKhdwNAcW2ldy47tJklTYKv6djehjh7oivTMFOR4m5jhG5MNrAbCprPtTeiK7KU3o8vCK8CyCYgRS/+LfmryNdXTB4N5B8VQzx26jl3+aJE8g5uJacSOYnv1bc+i89ZLAVW9Xwy4EGKZqQW/cZrDS6NDAPyU05Hell/PZMcHIqkNhcb4AJdGfjXJ3zOrv02F7PxYL8cAsapfUgaFME/2rNokuUTYAWN9lHx3VH51bxEM36lVlPKme0O9Op7hVE4GWvcjab7u54oOlOTFk1L4f2gYC75f1rsweRLwxpQ/XgZgwMAQHkGdYsp1jagVJkbXZE0p+jFN12KOQK/+9ahLuSJwxk4rCsIvR1XlIU2Taw0/v3OWM5u2A00WQkRHW7A3LfHGDFg2JgKCxPnBlzUFliFEubuU5WyWK/BllqZPpSUhinQrymVQEdSFM1eJEfJNVxN6lj4DmcWUmc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TqMaeI1psMq2k1IWq42wPYlDlEqRNoyR1q4Hh3CW4Q6Sz3k5lktLoUUsQREJ5/5d/mNOr76gOUDO4C+QJKYBLojZnfHiY66RjHIqjs="
|
|
@ -1,25 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
./gradlew --no-daemon clean assembleRelease -x lintKotlinMain
|
||||
|
||||
TOOLS="$(ls -d ${ANDROID_HOME}/build-tools/* | tail -1)"
|
||||
|
||||
shopt -s globstar nullglob extglob
|
||||
APKS=( **/*"-unsigned.apk"* )
|
||||
|
||||
DEST=$PWD/apk
|
||||
|
||||
rm -rf $DEST && mkdir -p $DEST
|
||||
|
||||
for APK in ${APKS[@]}; do
|
||||
BASENAME=$(basename $APK)
|
||||
APKNAME="${BASENAME%%+(-release*)}.apk"
|
||||
APKDEST="$DEST/$APKNAME"
|
||||
|
||||
${TOOLS}/zipalign -c -v -p 4 $APK
|
||||
cp $APK $APKDEST
|
||||
if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
|
||||
${TOOLS}/apksigner sign --ks $STORE_PATH --ks-key-alias $STORE_ALIAS --ks-pass env:STORE_PASS --key-pass env:KEY_PASS $APKDEST
|
||||
fi
|
||||
done
|
Binary file not shown.
|
@ -1,5 +1,4 @@
|
|||
[![Travis](https://img.shields.io/travis/inorichi/tachiyomi-extensions.svg)](https://travis-ci.org/inorichi/tachiyomi-extensions)
|
||||
[![fdroid dev](https://img.shields.io/badge/stable-wiki-blue.svg)](https://github.com/inorichi/tachiyomi/wiki/FDroid-for-dev-versions)
|
||||
![CI](https://github.com/inorichi/tachiyomi-extensions/workflows/CI/badge.svg?event=push)
|
||||
|
||||
This repository contains the available extension catalogues for the [Tachiyomi](https://github.com/inorichi/tachiyomi) app.
|
||||
|
||||
|
|
Loading…
Reference in New Issue