mirror of
https://github.com/tachiyomiorg/tachiyomi-extensions-inspector.git
synced 2024-12-26 16:51:50 +01:00
Rewrite actions
This commit is contained in:
parent
1e38a38368
commit
6e7d58ebe8
9
.github/workflows/build_pull_request.yml
vendored
9
.github/workflows/build_pull_request.yml
vendored
@ -50,19 +50,12 @@ jobs:
|
|||||||
cd master
|
cd master
|
||||||
curl https://raw.githubusercontent.com/Suwayomi/Tachidesk/android-jar/android.jar -o AndroidCompat/lib/android.jar
|
curl https://raw.githubusercontent.com/Suwayomi/Tachidesk/android-jar/android.jar -o AndroidCompat/lib/android.jar
|
||||||
|
|
||||||
- name: Cache node_modules
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
**/webUI/node_modules
|
|
||||||
key: ${{ runner.os }}-${{ hashFiles('**/webUI/yarn.lock') }}
|
|
||||||
|
|
||||||
- name: Build and copy webUI, Build Jar
|
- name: Build and copy webUI, Build Jar
|
||||||
uses: eskatos/gradle-command-action@v1
|
uses: eskatos/gradle-command-action@v1
|
||||||
with:
|
with:
|
||||||
build-root-directory: master
|
build-root-directory: master
|
||||||
wrapper-directory: master
|
wrapper-directory: master
|
||||||
arguments: :webUI:copyBuild :server:shadowJar --stacktrace
|
arguments: :server:shadowJar --stacktrace
|
||||||
wrapper-cache-enabled: true
|
wrapper-cache-enabled: true
|
||||||
dependencies-cache-enabled: true
|
dependencies-cache-enabled: true
|
||||||
configuration-cache-enabled: true
|
configuration-cache-enabled: true
|
72
.github/workflows/build_push.yml
vendored
72
.github/workflows/build_push.yml
vendored
@ -52,82 +52,12 @@ jobs:
|
|||||||
cd master
|
cd master
|
||||||
curl https://raw.githubusercontent.com/Suwayomi/Tachidesk/android-jar/android.jar -o AndroidCompat/lib/android.jar
|
curl https://raw.githubusercontent.com/Suwayomi/Tachidesk/android-jar/android.jar -o AndroidCompat/lib/android.jar
|
||||||
|
|
||||||
- name: Cache node_modules
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
**/webUI/node_modules
|
|
||||||
key: ${{ runner.os }}-${{ hashFiles('**/webUI/yarn.lock') }}
|
|
||||||
|
|
||||||
- name: Build and copy webUI, Build Jar
|
- name: Build and copy webUI, Build Jar
|
||||||
uses: eskatos/gradle-command-action@v1
|
uses: eskatos/gradle-command-action@v1
|
||||||
env:
|
|
||||||
ProductBuildType: "Preview"
|
|
||||||
with:
|
with:
|
||||||
build-root-directory: master
|
build-root-directory: master
|
||||||
wrapper-directory: master
|
wrapper-directory: master
|
||||||
arguments: :webUI:copyBuild :server:shadowJar --stacktrace
|
arguments: :server:shadowJar --stacktrace
|
||||||
wrapper-cache-enabled: true
|
wrapper-cache-enabled: true
|
||||||
dependencies-cache-enabled: true
|
dependencies-cache-enabled: true
|
||||||
configuration-cache-enabled: true
|
configuration-cache-enabled: true
|
||||||
|
|
||||||
# - name: Mock Build and copy webUI, Build Jar
|
|
||||||
# run: |
|
|
||||||
# mkdir -p master/server/build
|
|
||||||
# cd master/server/build
|
|
||||||
# echo "test" > Tachidesk-v0.3.8-r583.jar
|
|
||||||
|
|
||||||
- name: Generate Tag Name
|
|
||||||
id: GenTagName
|
|
||||||
run: |
|
|
||||||
cd master/server/build
|
|
||||||
genTag=$(ls *.jar | sed -e's/Tachidesk-\|.jar//g')
|
|
||||||
echo "$genTag"
|
|
||||||
echo "::set-output name=value::$genTag"
|
|
||||||
|
|
||||||
- name: make windows packages
|
|
||||||
run: |
|
|
||||||
cd master/scripts
|
|
||||||
./windows-bundler.sh win32
|
|
||||||
./windows-bundler.sh win64
|
|
||||||
|
|
||||||
# - name: Mock make windows packages
|
|
||||||
# run: |
|
|
||||||
# cd master/server/build
|
|
||||||
# echo test > Tachidesk-v0.3.8-r580-win32.zip
|
|
||||||
|
|
||||||
- name: Checkout preview branch
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
repository: 'Suwayomi/Tachidesk-preview'
|
|
||||||
ref: main
|
|
||||||
path: preview
|
|
||||||
token: ${{ secrets.DEPLOY_PREVIEW_TOKEN }}
|
|
||||||
|
|
||||||
- name: Create Tag
|
|
||||||
run: |
|
|
||||||
TAG="${{ steps.GenTagName.outputs.value }}"
|
|
||||||
echo "tag: $TAG"
|
|
||||||
cd preview
|
|
||||||
echo "{ \"latest\": \"$TAG\" }" > index.json
|
|
||||||
git add index.json
|
|
||||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
||||||
git config --global user.name "github-actions[bot]"
|
|
||||||
git commit -m "Updated to $TAG"
|
|
||||||
git push origin main
|
|
||||||
|
|
||||||
git tag $TAG
|
|
||||||
git push origin $TAG
|
|
||||||
|
|
||||||
- name: Upload Preview Release
|
|
||||||
uses: ncipollo/release-action@v1
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.DEPLOY_PREVIEW_TOKEN }}
|
|
||||||
artifacts: "master/server/build/*.jar,master/server/build/*.zip"
|
|
||||||
owner: "Suwayomi"
|
|
||||||
repo: "Tachidesk-preview"
|
|
||||||
tag: ${{ steps.GenTagName.outputs.value }}
|
|
||||||
|
|
||||||
- name: Run Docker build workflow
|
|
||||||
run: |
|
|
||||||
curl -X POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: token ${{ secrets.DEPLOY_PREVIEW_TOKEN }}" -d '{"ref":"main", "inputs":{"tachidesk_release_type": "preview"}}' https://api.github.com/repos/suwayomi/docker-tachidesk/actions/workflows/build_container_images.yml/dispatches
|
|
||||||
|
37
.github/workflows/issue_closer.yml
vendored
37
.github/workflows/issue_closer.yml
vendored
@ -1,37 +0,0 @@
|
|||||||
name: Issue closer
|
|
||||||
|
|
||||||
on:
|
|
||||||
issues:
|
|
||||||
types: [opened, edited, reopened]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
autoclose:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Autoclose issues
|
|
||||||
uses: arkon/issue-closer-action@v3.0
|
|
||||||
with:
|
|
||||||
repo-token: ${{ github.token }}
|
|
||||||
rules: |
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"type": "title",
|
|
||||||
"regex": ".*<short description>*",
|
|
||||||
"message": "You did not fill out the description in the title"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "body",
|
|
||||||
"regex": ".*DELETE THIS SECTION IF YOU HAVE READ AND ACKNOWLEDGED IT.*",
|
|
||||||
"message": "The acknowledgment section was not removed"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "body",
|
|
||||||
"regex": "(Tachidesk version|Server Operating System|Server Desktop Environment|Server JVM version|Client Operating System|Client Web Browser):.*(\\(Example:|<usually).*",
|
|
||||||
"message": "The requested information was not filled out"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "body",
|
|
||||||
"regex": ".*Remove this line after you are done.*",
|
|
||||||
"message": "The lines requesting to be removed were not removed."
|
|
||||||
}
|
|
||||||
]
|
|
24
.github/workflows/publish.yml
vendored
24
.github/workflows/publish.yml
vendored
@ -51,42 +51,22 @@ jobs:
|
|||||||
cd master
|
cd master
|
||||||
curl https://raw.githubusercontent.com/Suwayomi/Tachidesk/android-jar/android.jar -o AndroidCompat/lib/android.jar
|
curl https://raw.githubusercontent.com/Suwayomi/Tachidesk/android-jar/android.jar -o AndroidCompat/lib/android.jar
|
||||||
|
|
||||||
- name: Cache node_modules
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
**/webUI/node_modules
|
|
||||||
key: ${{ runner.os }}-${{ hashFiles('**/webUI/yarn.lock') }}
|
|
||||||
|
|
||||||
- name: Build and copy webUI, Build Jar
|
- name: Build and copy webUI, Build Jar
|
||||||
uses: eskatos/gradle-command-action@v1
|
uses: eskatos/gradle-command-action@v1
|
||||||
env:
|
|
||||||
ProductBuildType: "Stable"
|
|
||||||
with:
|
with:
|
||||||
build-root-directory: master
|
build-root-directory: master
|
||||||
wrapper-directory: master
|
wrapper-directory: master
|
||||||
arguments: :webUI:copyBuild :server:shadowJar --stacktrace
|
arguments: :server:shadowJar --stacktrace
|
||||||
wrapper-cache-enabled: true
|
wrapper-cache-enabled: true
|
||||||
dependencies-cache-enabled: true
|
dependencies-cache-enabled: true
|
||||||
configuration-cache-enabled: true
|
configuration-cache-enabled: true
|
||||||
|
|
||||||
- name: make windows packages
|
|
||||||
run: |
|
|
||||||
cd master/scripts
|
|
||||||
./windows-bundler.sh win32
|
|
||||||
./windows-bundler.sh win64
|
|
||||||
|
|
||||||
- name: Upload Release
|
- name: Upload Release
|
||||||
uses: xresloader/upload-to-github-release@v1
|
uses: xresloader/upload-to-github-release@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
file: "master/server/build/*.jar;master/server/build/*.zip"
|
file: "master/server/build/*.jar"
|
||||||
tags: true
|
tags: true
|
||||||
draft: true
|
draft: true
|
||||||
verbose: true
|
verbose: true
|
||||||
|
|
||||||
- name: Run Docker build workflow
|
|
||||||
run: |
|
|
||||||
curl -X POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: token ${{ secrets.DEPLOY_PREVIEW_TOKEN }}" -d '{"ref":"main", "inputs":{"tachidesk_release_type": "stable"}}' https://api.github.com/repos/suwayomi/docker-tachidesk/actions/workflows/build_container_images.yml/dispatches
|
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
start "" jre/bin/javaw -jar Tachidesk.jar
|
|
@ -1 +0,0 @@
|
|||||||
jre\bin\java -Dsuwayomi.tachidesk.server.debugLogsEnabled=true -jar Tachidesk.jar
|
|
@ -1 +0,0 @@
|
|||||||
jre\bin\javaw "-Dsuwayomi.tachidesk.server.webInterface=electron" "-Dsuwayomi.tachidesk.server.electronPath=electron/electron.exe" -jar Tachidesk.jar
|
|
@ -1,5 +0,0 @@
|
|||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
int main() {
|
|
||||||
system("start jre\\bin\\javaw -jar Tachidesk.jar");
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
# Building `Tachidesk Launcher.exe`
|
|
||||||
1. compile `Tachidesk Launcher.c` statically with MSVC compiler.
|
|
||||||
2. Add `server/src/main/resources/icon/faviconlogo.ico` into the exe with `rcedit` from the electron project: `rcedit "Tachidesk Launcher.exe" --set-icon faviconlogo.ico`
|
|
@ -1,83 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Copyright (C) Contributors to the Suwayomi project
|
|
||||||
#
|
|
||||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
||||||
|
|
||||||
electron_version="v12.0.9"
|
|
||||||
|
|
||||||
if [ $1 = "win32" ]; then
|
|
||||||
jre="OpenJDK8U-jre_x86-32_windows_hotspot_8u292b10.zip"
|
|
||||||
arch="win32"
|
|
||||||
electron="electron-$electron_version-win32-ia32.zip"
|
|
||||||
else
|
|
||||||
jre="OpenJDK8U-jre_x64_windows_hotspot_8u292b10.zip"
|
|
||||||
arch="win64"
|
|
||||||
electron="electron-$electron_version-win32-x64.zip"
|
|
||||||
fi
|
|
||||||
|
|
||||||
jre_dir="jdk8u292-b10-jre"
|
|
||||||
|
|
||||||
echo "creating windows bundle"
|
|
||||||
|
|
||||||
jar=$(ls ../server/build/*.jar | tail -n1)
|
|
||||||
jar_name=$(echo $jar | cut -d'/' -f4)
|
|
||||||
release_name=$(echo $jar_name | sed 's/.jar//')-$arch
|
|
||||||
|
|
||||||
|
|
||||||
# make release dir
|
|
||||||
mkdir $release_name
|
|
||||||
|
|
||||||
|
|
||||||
echo "Dealing with jre..."
|
|
||||||
if [ ! -f $jre ]; then
|
|
||||||
curl -L "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10/$jre" -o $jre
|
|
||||||
fi
|
|
||||||
unzip $jre
|
|
||||||
mv $jre_dir $release_name/jre
|
|
||||||
|
|
||||||
echo "Dealing with electron"
|
|
||||||
if [ ! -f $electron ]; then
|
|
||||||
curl -L "https://github.com/electron/electron/releases/download/$electron_version/$electron" -o $electron
|
|
||||||
fi
|
|
||||||
unzip $electron -d $release_name/electron
|
|
||||||
|
|
||||||
# change electron's icon
|
|
||||||
rcedit="rcedit-x86.exe"
|
|
||||||
if [ ! -f $rcedit ]; then
|
|
||||||
curl -L "https://github.com/electron/rcedit/releases/download/v1.1.1/$rcedit" -o $rcedit
|
|
||||||
fi
|
|
||||||
|
|
||||||
# check if running under github actions
|
|
||||||
if [ $CI = true ]; then
|
|
||||||
# change electron executable's icon
|
|
||||||
sudo dpkg --add-architecture i386
|
|
||||||
wget -qO - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
|
|
||||||
sudo add-apt-repository ppa:cybermax-dexter/sdl2-backport
|
|
||||||
sudo apt-add-repository "deb https://dl.winehq.org/wine-builds/ubuntu $(lsb_release -cs) main"
|
|
||||||
sudo apt install --install-recommends winehq-stable
|
|
||||||
fi
|
|
||||||
# this script assumes that wine is installed here on out
|
|
||||||
|
|
||||||
WINEARCH=win32 wine $rcedit $release_name/electron/electron.exe --set-icon ../server/src/main/resources/icon/faviconlogo.ico
|
|
||||||
|
|
||||||
# copy artifacts
|
|
||||||
cp $jar $release_name/Tachidesk.jar
|
|
||||||
#cp "resources/Tachidesk Launcher-$arch.exe" "$release_name/Tachidesk Launcher.exe"
|
|
||||||
cp "resources/Tachidesk Browser Launcher.bat" $release_name
|
|
||||||
cp "resources/Tachidesk Debug Launcher.bat" $release_name
|
|
||||||
cp "resources/Tachidesk Electron Launcher.bat" $release_name
|
|
||||||
|
|
||||||
zip_name=$release_name.zip
|
|
||||||
zip -9 -r $zip_name $release_name
|
|
||||||
|
|
||||||
rm -rf $release_name
|
|
||||||
|
|
||||||
# clean up from possible previous runs
|
|
||||||
if [ -f ../server/build/$zip_name ]; then
|
|
||||||
rm ../server/build/$zip_name
|
|
||||||
fi
|
|
||||||
|
|
||||||
mv $zip_name ../server/build/
|
|
Loading…
Reference in New Issue
Block a user