fix: 修复浏览器进程泄漏强杀兜底失效、账号任务假死竞态、验证完成后截图误报 (#96) #87
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: Auto Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| env: | |
| UPDATE_GITHUB_OWNER: ${{ github.repository_owner }} | |
| UPDATE_GITHUB_REPO: ${{ github.event.repository.name }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Read version | |
| id: version | |
| shell: bash | |
| run: | | |
| tag="$(tr -d '\r\n' < static/version.txt)" | |
| if [[ -z "$tag" ]]; then | |
| echo "static/version.txt is empty" >&2 | |
| exit 1 | |
| fi | |
| echo "tag=$tag" >> "$GITHUB_OUTPUT" | |
| - name: Check release exists | |
| id: exists | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| shell: bash | |
| run: | | |
| if gh release view "${{ steps.version.outputs.tag }}" >/dev/null 2>&1; then | |
| echo "release_exists=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "release_exists=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Generate update manifest | |
| if: steps.exists.outputs.release_exists != 'true' | |
| shell: bash | |
| run: | | |
| python3 generate_update_manifest.py . | |
| - name: Create tag and release | |
| if: steps.exists.outputs.release_exists != 'true' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| shell: bash | |
| run: | | |
| gh release create "${{ steps.version.outputs.tag }}" \ | |
| update_files.json \ | |
| --target "${{ github.sha }}" \ | |
| --title "${{ steps.version.outputs.tag }}" \ | |
| --generate-notes |