tweak: replace ghproxy

This commit is contained in:
cxfksword
2023-11-25 10:04:51 +08:00
parent 4087d1f70d
commit 2a73919ccb
9 changed files with 120 additions and 94 deletions

View File

@@ -20,8 +20,12 @@ jobs:
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: |

View File

@@ -12,11 +12,15 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
id: dotnet
with:
dotnet-version: 6.0.x
- name: Change default dotnet version
run: |
echo '{"sdk":{"version": "${{ steps.dotnet.outputs.dotnet-version }}"}}' > ./global.json
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
run: dotnet build --no-restore
# - name: Test
# run: dotnet test --no-restore --verbosity normal

View File

@@ -10,12 +10,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: close-issues
uses: actions-cool/issues-helper@v3
uses: actions/stale@v7
with:
actions: "close-issues"
token: ${{ secrets.GITHUB_TOKEN }}
inactive-day: 30
exclude-labels: "enhancement,bug"
close-reason: "not_planned"
body: |
This issue was closed due to inactive more than 30 days. You can reopen it if you think it should continue.
stale-issue-message: "This issue was closed due to inactive more than 30 days. You can reopen it if you think it should continue."
exempt-issue-labels: "FAQ,question,bug,enhancement"
days-before-stale: 30
days-before-close: 0
days-before-pr-stale: -1
days-before-pr-close: -1

View File

@@ -21,8 +21,16 @@ jobs:
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: Setup python
uses: actions/setup-python@v4
with:
python-version: ${{ env.python-version }}
- name: Initialize workflow variables
id: vars
run: |
@@ -35,34 +43,30 @@ 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.Danmu/bin/Release/net6.0/Jellyfin.Plugin.Danmu.dll ./artifacts/
- name: Compress build files
uses: thedoctor0/zip-release@main
zip -j ./artifacts/${{ env.artifact }}_${{steps.vars.outputs.VERSION}}.zip ./Jellyfin.Plugin.Danmu/bin/Release/net6.0/Jellyfin.Plugin.Danmu.dll
cp ./doc/logo.png ./artifacts/logo.png
- 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
uses: peaceiris/actions-gh-pages@v3
with:
type: "zip"
directory: "artifacts"
filename: "artifacts.zip"
exclusions: "*.json *.pdb"
- 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.sh && ./build.sh ${{ env.artifact }} ${{steps.vars.outputs.VERSION}} ${GITHUB_REF#refs/*/}
personal_token: ${{ secrets.PAT }}
external_repository: cxfksword/jellyfin-release
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: ./${{ env.artifact }}/${{ env.artifact }}_*.zip
file: ./artifacts/${{ env.artifact }}_*.zip
tag: ${{ github.ref }}
file_glob: true
- name: Publish manifest
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./manifest*.json
tag: "manifest"
overwrite: true
file_glob: true
# - name: Publish manifest
# uses: svenstaro/upload-release-action@v2
# with:
# repo_token: ${{ secrets.GITHUB_TOKEN }}
# file: ./artifacts/manifest*.json
# tag: "manifest"
# overwrite: true
# file_glob: true