Add version-tagged Gitea plugin release workflow

This commit is contained in:
Sleeps
2026-10-15 16:52:20 +01:00
parent c1aaf63c41
commit d51e82298a
@@ -0,0 +1,50 @@
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