Generate Hashes JSON #37
Workflow file for this run
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: Generate Hashes JSON | |
| on: | |
| push: | |
| tags: | |
| - '*' # 推送任意 tag 触发 | |
| workflow_dispatch: # 手动触发 | |
| permissions: | |
| contents: write # 允许提交更改 | |
| jobs: | |
| generate-hashes: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # 获取完整历史 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: Run generate-hashes.py | |
| run: python .github/scripts/generate_hashes.py | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Use Node.js 24 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24.x | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Run | |
| run: pnpm hash | |
| - name: Commit and push if changed | |
| uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_message: "chore: update hashes.json for tag ${{ github.ref_name }}" | |
| file_pattern: 'hashes.json smallest_hashes.json' | |
| branch: master |