diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index e09b3d6..5c55b89 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -43,14 +43,7 @@ jobs: dotnet restore ${{ env.project }} --no-cache dotnet publish --nologo --no-restore --configuration=Release --framework=net6.0 -p:Version=${{steps.vars.outputs.VERSION}} ${{ env.project }} mkdir -p artifacts - cp ./Jellyfin.Plugin.MetaShark/bin/Release/net6.0/Jellyfin.Plugin.MetaShark.dll ./artifacts/ - - name: Compress build files - uses: thedoctor0/zip-release@main - with: - type: "zip" - directory: "artifacts" - filename: "${{ env.artifact }}_${{steps.vars.outputs.VERSION}}.zip" - exclusions: "*.json *.pdb" + zip -j ./artifacts/${{ env.artifact }}_${{steps.vars.outputs.VERSION}}.zip ./Jellyfin.Plugin.MetaShark/bin/Release/net6.0/Jellyfin.Plugin.MetaShark.dll - name: Generate manifest run: cd artifacts && python3 ../generate_manifest.py ${{ env.artifact }}_${{steps.vars.outputs.VERSION}}.zip ${GITHUB_REF#refs/*/} - name: Deploy to jellyfin release repo @@ -61,13 +54,13 @@ jobs: destination_dir: ${{ env.artifact }} publish_branch: master publish_dir: ./artifacts - - name: Publish 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: Publish 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: Publish manifest # uses: svenstaro/upload-release-action@v2 # with: diff --git a/generate_manifest.py b/generate_manifest.py index e26b76a..07aafd8 100755 --- a/generate_manifest.py +++ b/generate_manifest.py @@ -46,7 +46,7 @@ def main(): # 解析旧 manifest try: - with urlopen('https://github.com/cxfksword/jellyfin-plugin-metashark/releases/download/manifest/maniest.json') as f: + with urlopen('https://raw.githubusercontent.com/cxfksword/jellyfin-release/master/metashark/manifest.json') as f: manifest = json.load(f) except HTTPError as err: if err.code == 404: @@ -63,7 +63,8 @@ def main(): # 国内加速 with open('manifest_cn.json', 'w') as f: manifest_cn = json.dumps(manifest, indent=2) - manifest_cn = re.sub("github.com", "gh-proxy.com/https://github.com", manifest_cn) + manifest_cn = re.sub('https://github.com/cxfksword/jellyfin-plugin-metashark/raw/main/doc/logo.png', "https://jellyfin-plugin-release.pages.dev/metashark/logo.png", manifest_cn) + manifest_cn = re.sub('https://github.com/cxfksword/jellyfin-plugin-metashark/releases/download/v[0-9.]+', "https://jellyfin-plugin-release.pages.dev/metashark", manifest_cn) f.write(manifest_cn)