Compare commits

...

9 Commits
main ... ci

Author SHA1 Message Date
cxfksword 4cf5b24dfe ci: update github action 2023-12-02 16:30:23 +08:00
cxfksword fe717ef781 ci: update github action 2023-12-02 16:17:07 +08:00
cxfksword 209c46d620 ci: update github action 2023-12-02 16:12:21 +08:00
cxfksword a1fb0e9a57 ci: update github action 2023-12-02 16:08:21 +08:00
cxfksword 1528aa44b9 ci: update github action 2023-12-02 16:05:30 +08:00
cxfksword 072779f172 ci: update github action 2023-12-02 15:40:45 +08:00
cxfksword 7d6a172386 ci: update github action 2023-12-02 15:39:21 +08:00
cxfksword b24ac31a37 ci: update github action 2023-12-02 15:37:09 +08:00
cxfksword 5da4e53957 ci: update github action 2023-12-02 15:33:55 +08:00
2 changed files with 54 additions and 1 deletions

53
.github/workflows/test.yaml vendored Normal file
View File

@ -0,0 +1,53 @@
name: "Test"
on:
push:
env:
dotnet-version: 6.0.x
python-version: 3.8
project: Jellyfin.Plugin.MetaShark
artifact: metashark
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
id: dotnet
with:
dotnet-version: ${{ env.dotnet-version }}
- name: Change default dotnet version
run: |
echo '{"sdk":{"version": "${{ steps.dotnet.outputs.dotnet-version }}"}}' > ./global.json
- name: Initialize workflow variables
id: vars
run: |
VERSION=$(echo "v1.7.4" | sed s/^v//)
VERSION="$VERSION.0"
echo ::set-output name=VERSION::${VERSION}
echo ::set-output name=APP_NAME::$(echo "${{ env.artifact }}_${VERSION}")
- name: Build
run: |
dotnet restore ${{ env.project }}/${{ env.project }}.csproj --no-cache
dotnet publish --nologo --no-restore --configuration=Release --framework=net6.0 -p:Version=${{steps.vars.outputs.VERSION}} ${{ env.project }}
mkdir -p artifacts
zip -j ./artifacts/${{steps.vars.outputs.APP_NAME}}.zip ./${{ env.project }}/bin/Release/net6.0/${{ env.project }}.dll
cp ./doc/logo.png ./artifacts/logo.png
- name: Generate manifest
run: cd artifacts && python3 ../scripts/generate_manifest.py ${{steps.vars.outputs.APP_NAME}}.zip v1.7.4
- name: Deploy to jellyfin release repo
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.PAT }}
external_repository: cxfksword/jellyfin-release
destination_dir: test
publish_branch: master
publish_dir: ./artifacts
keep_files: true

View File

@ -56,7 +56,7 @@ def main():
raise
# 追加新版本/覆盖旧版本
manifest[0]['versions'] = list(filter(lambda x: x['version'] == version, manifest[0]['versions']))
manifest[0]['versions'] = list(filter(lambda x: x['version'] != f"{version}.0", manifest[0]['versions']))
manifest[0]['versions'].insert(0, generate_version(filepath, version, changelog))
with open('manifest.json', 'w') as f: