Files

64 lines
1.9 KiB
YAML

name: '🚀 Publish Plugin'
on:
release:
types:
- released
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
ref: "master"
- name: Setup .NET
uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3
with:
dotnet-version: 9.0.x
- name: Setup jprm
run: |
pip install --user jprm
- name: Build Jellyfin Plugin
uses: oddstr13/jellyfin-plugin-repository-manager@eabb903cdac8a7f6d94df887c6910b5720ec48f9 # v1.0.11
id: jprm
with:
dotnet-target: net9.0
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: build-artifact
retention-days: 30
if-no-files-found: error
path: ${{ steps.jprm.outputs.artifact }}
- name: Upload to Release
id: release
if: ${{ github.event_name == 'release' }}
uses: shogo82148/actions-upload-release-asset@dccd6d23e64fd6a746dce6814c0bde0a04886085 # v1.7.2
with:
upload_url: ${{ github.event.release.upload_url }}
overwrite: true
asset_path: ${{ steps.jprm.outputs.artifact }}
- name: Update manifest
if: ${{ github.event_name == 'release' }}
run: |
jprm repo add --plugin-url ${{ steps.release.outputs.browser_download_url }} . ${{ steps.jprm.outputs.artifact }}
- name: Commit manifest
if: ${{ github.event_name == 'release' }}
run: |
git config user.name jellyfin-bot
git config user.email team@jellyfin.org
git pull
git add ./manifest.json
git diff --cached --quiet || git commit -m "Update manifest.json"
git push origin master