jellyfin-plugin-metashark/.github/workflows/publish.yaml

59 lines
1.8 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: "🚀 Publish Plugin"
on:
push:
tags: ["*"]
env:
dotnet-version: 6.0.x
python-version: 3.8
project: Jellyfin.Plugin.MetaShark/Jellyfin.Plugin.MetaShark.csproj
branch: main
artifact: metashark
manifest: https://github.com/cxfksword/jellyfin-plugin-metashark/releases/download/manifest/manifest.json
jobs:
build:
runs-on: ubuntu-latest
name: Build & Release
steps:
- uses: actions/checkout@v3
- name: Get tags (For CHANGELOG)
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.dotnet-version }}
- name: Restore nuget packages
run: dotnet restore ${{ env.project }} # 需要指定项目要不然会同时build多个项目导致出错
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: ${{ env.python-version }}
- name: Install JPRM
run: python -m pip install jprm
- name: Run JPRM
run: chmod +x ./build_plugin.sh && ./build_plugin.sh ${{ env.artifact }} ${GITHUB_REF#refs/*/}
- name: Update release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./artifacts/${{ env.artifact }}_*.zip
tag: ${{ github.ref }}
file_glob: true
- name: Update manifest
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./*.json
tag: "manifest"
overwrite: true
file_glob: true
# - name: Update manifest
# uses: stefanzweifel/git-auto-commit-action@v4
# with:
# branch: ${{ env.branch }}
# commit_message: Update repo manifest
# file_pattern: "*.json"