Skip to content
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.

Release with Tachidesk #2

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/runner-files/ci-gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
org.gradle.daemon=false
org.gradle.jvmargs=-Xmx5120m
org.gradle.workers.max=5
org.gradle.parallel=true

kotlin.incremental=false
kotlin.compiler.execution.strategy=in-process
104 changes: 104 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: CI Publish

on:
push:
tags:
- 'v*'

jobs:
build:
name: Build artifacts and release
runs-on: ubuntu-latest

steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout Tachidesk
uses: actions/checkout@v2
with:
repository: 'Suwayomi/Tachidesk'
ref: master
path: tachidesk
fetch-depth: 0

- name: Remove Tachidesk's webUI
run: rm -rf tachidesk/webUI/src/*

- name: Checkout Equinox and put it as webUI
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
path: tachidesk/webUI/src
fetch-depth: 0

- name: Calculate revision
id: calcRevision
run: |
cd tachidesk/webUI/src
rev=$(git rev-list HEAD --count)
echo "revision $rev"
echo "::set-output name=value::r$rev"

# Build Tachidesk with Equinox together
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Copy CI gradle.properties
run: |
cd tachidesk
mkdir -p ~/.gradle
cp .github/runner-files/ci-gradle.properties ~/.gradle/gradle.properties

- name: Download android.jar
run: |
cd tachidesk
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/src/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/webUI/src/yarn.lock') }}

# - name: Build and copy webUI, Build Jar
# uses: eskatos/gradle-command-action@v1
# env:
# ProductName: "Equinox"
# ProductBuildType: "Stable"
# ProductVersion: ${{ github.ref }}
# ProductRevision: ${{ steps.calcRevision.outputs.value }}
# with:
# build-root-directory: tachidesk
# wrapper-directory: tachidesk
# arguments: :webUI:copyBuild :server:shadowJar --stacktrace
# wrapper-cache-enabled: true
# dependencies-cache-enabled: true
# configuration-cache-enabled: true

- name: Mock Build and copy webUI, Build Jar
run: |
mkdir -p tachidesk/server/build
cd tachidesk/server/build
echo "test" > Equinox-v0.0.8-r1.jar

- name: make windows packages
run: |
cd tachidesk/scripts
./windows-bundler.sh win32
./windows-bundler.sh win64

- name: Upload Release
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
file: "tachidesk/server/build/*.jar;tachidesk/server/build/*.zip"
tags: true
draft: true
verbose: true
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build && cp _redirects dist/_redirects",
"build": "vue-tsc --noEmit && vite build && cp _redirects dist/_redirects && mv dist build",
"serve": "vite preview",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
Expand Down