This repository was archived by the owner on Jan 9, 2026. It is now read-only.
chore: bump version to 1.4.5 #35
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: Build and Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: '版本号 (例如: v1.0.0)' | |
| required: true | |
| type: string | |
| jobs: | |
| release: | |
| runs-on: windows-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Build exe | |
| run: | | |
| uv run pyinstaller lucky-lillia-desktop.spec | |
| dir dist | |
| (Get-Item dist/lucky-lillia-desktop.exe).Length / 1MB | |
| - name: Compress exe to zip | |
| run: Compress-Archive -Path dist/lucky-lillia-desktop.exe -DestinationPath dist/lucky-lillia-desktop-win-x64.zip | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ inputs.tag || github.ref_name }} | |
| name: Lucky-Lillia-Desktop ${{ inputs.tag || github.ref_name }} | |
| generate_release_notes: true | |
| draft: true | |
| files: dist/lucky-lillia-desktop-win-x64.zip | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
| - name: Setup Node.js | |
| if: github.event_name == 'push' | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Prepare and publish npm package | |
| if: github.event_name == 'push' | |
| run: | | |
| npm install -g npm@latest | |
| mkdir package | |
| copy dist\lucky-lillia-desktop.exe package\ | |
| copy package.json package\ | |
| cd package | |
| npm version ${{ github.ref_name }} --no-git-tag-version --allow-same-version | |
| cd .. | |
| tar -czf lucky-lillia-desktop-win-x64.tgz package | |
| npm publish lucky-lillia-desktop-win-x64.tgz --provenance --access public |