Skip to content
This repository was archived by the owner on Jan 9, 2026. It is now read-only.

chore: bump version to 1.2.1 #24

chore: bump version to 1.2.1

chore: bump version to 1.2.1 #24

Workflow file for this run

name: Release and Publish
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 dependencies
run: |
pip install pyinstaller
pip install -r requirements.txt
- name: Build exe
run: |
pyinstaller lucky-lillia-desktop.spec
dir dist
(Get-Item dist/lucky-lillia-desktop.exe).Length / 1MB
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Update npm
run: npm install -g npm@latest
- 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: Prepare npm package
run: |
mkdir package
copy dist\lucky-lillia-desktop.exe package\
copy package.json package\
tar -czf lucky-lillia-desktop-win-x64.tgz package
- name: Update npm package version
run: |
cd package
npm version ${{ inputs.tag || github.ref_name }} --no-git-tag-version --allow-same-version
cd ..
tar -czf lucky-lillia-desktop-win-x64.tgz package
- name: Publish to npm
run: npm publish lucky-lillia-desktop-win-x64.tgz --provenance --access public