diff --git a/.github/runner-files/Inspector.jar b/.github/runner-files/Inspector.jar new file mode 100644 index 000000000..298e671b4 Binary files /dev/null and b/.github/runner-files/Inspector.jar differ diff --git a/.github/scripts/create-repo.sh b/.github/scripts/create-repo.sh index 252f8b390..87198182f 100755 --- a/.github/scripts/create-repo.sh +++ b/.github/scripts/create-repo.sh @@ -30,6 +30,8 @@ for APK in ${APKS[@]}; do ICON=$(echo "$BADGING" | grep -Po "application-icon-320.*'\K[^']+") unzip -p $APK $ICON > icon/${FILENAME%.*}.png + SOURCE_INFO=$(jq ".[\"$PKGNAME\"]" < ../output.json) + jq -n \ --arg name "$LABEL" \ --arg pkg "$PKGNAME" \ @@ -38,7 +40,8 @@ for APK in ${APKS[@]}; do --argjson code $VCODE \ --arg version "$VNAME" \ --argjson nsfw $NSFW \ - '{name:$name, pkg:$pkg, apk:$apk, lang:$lang, code:$code, version:$version, nsfw:$nsfw}' + --argjson sources "$SOURCE_INFO" \ + '{name:$name, pkg:$pkg, apk:$apk, lang:$lang, code:$code, version:$version, nsfw:$nsfw, sources:$sources}' done | jq -sr '[.[]]' > index.json diff --git a/.github/workflows/build_push.yml b/.github/workflows/build_push.yml index 510fecc6c..0357668d2 100644 --- a/.github/workflows/build_push.yml +++ b/.github/workflows/build_push.yml @@ -128,6 +128,11 @@ jobs: ref: master path: master + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Sign APKs run: | cd master @@ -137,6 +142,13 @@ jobs: ${{ secrets.KEY_STORE_PASSWORD }} \ ${{ secrets.KEY_PASSWORD }} + - name: Run inspector + run: | + cd master + INSPECTOR_LINK="$(curl -s "https://api.github.com/repos/tachiyomiorg/tachiyomi-extensions-inspector/releases/latest" | jq -r '.assets[0].browser_download_url')" + curl -L "$INSPECTOR_LINK" -o ./Inspector.jar + java -jar ./Inspector.jar "apk" "output.json" "tmp" + - name: Create repo artifacts run: | cd master