Files
jellyfin-plugin-danmu/.github/workflows/publish.yaml
cxfksword e4b2edac4e Fix build
2022-10-14 12:49:52 +08:00

57 lines
1.7 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.Danmu/Jellyfin.Plugin.Danmu.csproj
branch: main
artifact: danmu
manifest: https://github.com/cxfksword/jellyfin-plugin-danmu/releases/download/manifest/manifest.json
jobs:
build:
runs-on: ubuntu-latest
name: Build & Release
steps:
- uses: actions/checkout@v3
- 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 ${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"