mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-01-06 12:10:26 -05:00
106 lines
3.0 KiB
YAML
106 lines
3.0 KiB
YAML
name: Release the application
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
name: Builf for ${{matrix.artifact}}
|
|
runs-on: ${{matrix.os}}
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- os: ubuntu-latest
|
|
runtime: linux-x64
|
|
artifact: linux
|
|
# - os: windows-latest
|
|
# runtime: win-x64
|
|
# artifact: windows
|
|
# - os: macOS-latest
|
|
# runtime: osx-x64
|
|
# artifact: macos
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- name: Checkout submodules
|
|
run: git submodule update --init --recursive
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v1
|
|
with:
|
|
dotnet-version: 5.0.x
|
|
- name: Build the app
|
|
run: dotnet publish -r ${{matrix.runtime}} -c Release -o dist Kyoo
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: kyoo_${{matrix.artifact}}
|
|
path: dist/*
|
|
|
|
release:
|
|
name: Create debian & rpm releases
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
env:
|
|
description: "A media browser"
|
|
version: v0.0.1 #${{ github.ref }}
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: kyoo_linux
|
|
path: dist
|
|
- name: Create the package structure
|
|
run: |
|
|
mkdir -p pkg/usr/lib/
|
|
mkdir -p pkg/DEBIAN
|
|
cp -r --no-preserve ownership dist pkg/usr/lib/kyoo
|
|
install -Dm 644 deployment/kyoo.service -t pkg/usr/lib/systemd/system/
|
|
install -Dm 644 deployment/kyoo.sysusers pkg/usr/lib/sysusers.d/kyoo.conf
|
|
install -Dm 644 deployment/kyoo.tmpfiles pkg/usr/lib/tmpfiles.d/kyoo.conf
|
|
install -Dm 755 deployment/postinst -t pkg/DEBIAN/
|
|
install -Dm 755 deployment/postrm -t pkg/DEBIAN/
|
|
- uses: jiro4989/build-rpm-action@v2
|
|
with:
|
|
package: kyoo
|
|
package_root: pkg
|
|
maintainer: Zoe Roux
|
|
version: ${{env.version}}
|
|
arch: x86_64
|
|
# requires: postgresql-server
|
|
desc: ${{env.description}}
|
|
summary: ${{env.description}}
|
|
- uses: jiro4989/build-deb-action@v2
|
|
with:
|
|
package: kyoo
|
|
package_root: pkg
|
|
maintainer: Zoe Roux
|
|
version: ${{env.version}}
|
|
depends: postgresql
|
|
arch: amd64
|
|
desc: ${{env.description}}
|
|
- name: Prepare arch package
|
|
run: |
|
|
mkdir deployment/output
|
|
cp -a pkg/usr deployment/output/usr
|
|
- uses: edlanglois/pkgbuild-action@v1
|
|
id: makepkg
|
|
with:
|
|
pkgdir: deployment
|
|
makepkgArgs: -p PKGBUILD.github
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
path: |
|
|
./*.rpm
|
|
!./*-debuginfo-*.rpm
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
path: ./*.deb
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
path: ${{steps.makepkg.outputs.pkgfile0}}
|
|
|
|
# new-version:
|
|
# if: startsWith(github.ref, 'refs/tags/v')
|
|
# runs-on: ubuntu-latest
|
|
|