Merge pull request #91 from woleigedouer/main #140
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Metadata JSON Generator | |
| on: | |
| push: | |
| paths: | |
| - 'cms/**' | |
| - 'danMu/**' | |
| - 'live/**' | |
| - 'panTools/**' | |
| - 'recommend/**' | |
| - 'vod/**' | |
| workflow_dispatch: | |
| jobs: | |
| generate-metadata: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Generate Metadata | |
| run: | | |
| node action/parse-metadata.cjs | |
| - name: Commit changes | |
| run: | | |
| git config --global user.name 'GitHub Action' | |
| git config --global user.email 'action@github.com' | |
| git add README.md | |
| git add **/*.js | |
| git commit -m '该文件由 GitHub Actions 通过 parse-metadata.cjs 生成修改。' || echo 'No changes to commit' | |
| git push | |
| - name: 🚀 Upload JSON to GitHub Release | |
| uses: ncipollo/release-action@v1.18.0 | |
| with: | |
| tag: uzVideo-Extensions-${{ github.ref_name }} # 根据分支名生成 tag | |
| name: "uzVideo-Extensions (${{ github.ref_name }})" | |
| body: "Release ${{ github.ref_name }}" | |
| allowUpdates: true | |
| replacesArtifacts: true | |
| draft: false | |
| prerelease: false | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| artifacts: | | |
| uzAio.json | |
| uzAio_raw.json | |
| av_auto.json | |
| av_raw_auto.json | |
| panTools/panTools.json | |
| danMu/danMu.json | |
| recommend/recommend.json | |
| vod/vod.json | |
| uzAio.zip |