mirror of
https://github.com/MrSleeps/jellyfin-scene-search.git
synced 2026-11-14 22:11:27 +00:00
51 lines
1.7 KiB
YAML
51 lines
1.7 KiB
YAML
name: Publish Jellyfin plugin to Gitea
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v[0-9]*'
|
|
workflow_dispatch:
|
|
inputs:
|
|
release_tag:
|
|
description: 'Existing version tag (e.g. v0.1.5.0)'
|
|
required: true
|
|
type: string
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out tagged source
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.release_tag || github.ref }}
|
|
- name: Set release tag
|
|
run: echo "RELEASE_TAG=${{ github.event_name == 'workflow_dispatch' && inputs.release_tag || github.ref_name }}" >> "$GITHUB_ENV"
|
|
- name: Install .NET 10 SDK
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: '10.0.x'
|
|
- name: Build Jellyfin plugin
|
|
run: dotnet build jellyfin-plugin/Jellyfin.Plugin.SceneSearch/Jellyfin.Plugin.SceneSearch.csproj --configuration Release --nologo
|
|
- name: Package plugin
|
|
run: python3 scripts/publish-jellyfin-plugin.py
|
|
- name: Upload package for inspection
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: scene-search-plugin
|
|
path: dist/*.zip
|
|
- name: Publish release and catalog on Gitea
|
|
env:
|
|
GITEA_URL: ${{ vars.GITEA_URL }}
|
|
GITEA_REPO: ${{ vars.GITEA_DISTRIBUTION_REPO }}
|
|
GITEA_TOKEN: ${{ secrets.GITEA_RELEASE_TOKEN }}
|
|
run: |
|
|
test -n "$GITEA_URL" && test -n "$GITEA_REPO" && test -n "$GITEA_TOKEN" || {
|
|
echo 'Configure GITEA_URL, GITEA_DISTRIBUTION_REPO and GITEA_RELEASE_TOKEN first.'
|
|
exit 1
|
|
}
|
|
python3 scripts/publish-jellyfin-plugin.py --publish
|