mirror of
https://github.com/Suwayomi/TachideskJUI.git
synced 2026-01-17 09:12:33 +01:00
117 lines
3.6 KiB
YAML
117 lines
3.6 KiB
YAML
# This is a basic workflow to help you get started with Actions
|
|
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- v*
|
|
|
|
jobs:
|
|
BuildBinaries:
|
|
name: Build application packages
|
|
strategy:
|
|
matrix:
|
|
runtime: [ linux-x64, linux-centos-x64, osx-x64, win-x64 ]
|
|
include:
|
|
- runtime: linux-x64
|
|
arch: x64
|
|
os: ubuntu-latest
|
|
shell: bash
|
|
buildPackage: ./scripts/BuildLinuxDeb.sh
|
|
buildJar: ./scripts/BuildUnixJar.sh
|
|
setupCl: ./scripts/SetupClUnix.sh
|
|
|
|
- runtime: linux-centos-x64
|
|
arch: x64
|
|
os: ubuntu-latest
|
|
shell: bash
|
|
buildPackage: ./scripts/BuildLinuxRpm.sh
|
|
buildJar: ./scripts/BuildUnixJar.sh
|
|
setupCl: ./scripts/SetupClUnix.sh
|
|
|
|
- runtime: osx-x64
|
|
arch: x64
|
|
os: macOS-latest
|
|
shell: bash
|
|
buildPackage: ./scripts/BuildMacDmg.sh
|
|
buildJar: ./scripts/BuildUnixJar.sh
|
|
setupCl: ./scripts/SetupClUnix.sh
|
|
|
|
- runtime: win-x64
|
|
arch: x64
|
|
os: windows-latest
|
|
shell: powershell
|
|
buildPackage: ./scripts/BuildWindowsMsi.ps1
|
|
buildJar: ./scripts/BuildWindowsJar.ps1
|
|
setupCl: ./scripts/SetupClWindows.ps1
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
defaults:
|
|
run:
|
|
shell: ${{ matrix.shell }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-java@v1
|
|
if: ${{ matrix.runtime != 'linux-centos-x64' }}
|
|
with:
|
|
java-version: '15'
|
|
architecture: ${{ matrix.arch }}
|
|
|
|
- name: Setup Cl
|
|
run: ${{ matrix.setupCl }}
|
|
|
|
- name: Build Package
|
|
if: ${{ matrix.runtime != 'linux-centos-x64' && matrix.runtime != 'osx-x64' }}
|
|
run: ${{ matrix.buildPackage }}
|
|
|
|
- name: Build MacOS Package
|
|
if: ${{ matrix.runtime == 'osx-x64' }}
|
|
run: |
|
|
echo ${{ secrets.APPLE_CERT }} | base64 --decode > certificate.p12
|
|
security create-keychain -p ${{ secrets.APPLE_KEYCHAIN_PASSWORD }} build.keychain
|
|
security default-keychain -s build.keychain
|
|
security unlock-keychain -p ${{ secrets.APPLE_KEYCHAIN_PASSWORD }} build.keychain
|
|
security import certificate.p12 -k build.keychain -P ${{ secrets.APPLE_CERT_PASSWORD }} -T /usr/bin/codesign
|
|
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k ${{ secrets.APPLE_KEYCHAIN_PASSWORD }} build.keychain
|
|
|
|
${{ matrix.buildPackage }} notarizeDmg \
|
|
-Pcompose.desktop.mac.sign=true \
|
|
-Pcompose.desktop.mac.signing.identity=${{ secrets.APPLE_IDENTITY }} \
|
|
-Pcompose.desktop.mac.notarization.appleID=${{ secrets.APPLE_ID }} \
|
|
-Pcompose.desktop.mac.notarization.password=${{ secrets.APPLE_PASSWORD }}
|
|
|
|
- name: Build Jar
|
|
if: ${{ matrix.runtime != 'linux-centos-x64' }}
|
|
run: ${{ matrix.buildJar }}
|
|
|
|
- name: Build rpm Package
|
|
if: ${{ matrix.runtime == 'linux-centos-x64' }}
|
|
uses: Syer10/CentOS-Java15-Action@v1
|
|
with:
|
|
command: ${{ matrix.buildPackage }}
|
|
|
|
# Upload runner package tar.gz/zip as artifact
|
|
- name: Publish Artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: runner-package-${{ matrix.runtime }}
|
|
path: |
|
|
build/compose/binaries/main/*/
|
|
build/compose/jars/
|
|
!build/compose/binaries/main/app/
|
|
ReleaseBinaries:
|
|
name: Make a release
|
|
needs: [BuildBinaries]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Download Build Artifacts
|
|
uses: actions/download-artifact@v2
|
|
|
|
- uses: ncipollo/release-action@v1
|
|
with:
|
|
artifacts: "*/binaries/main/*/*.*,*/jars/*.jar"
|
|
draft: true
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|