v1.0.1 #2
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: 构建并发布Release | |
| on: | |
| pull_request: | |
| types: | |
| - closed | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| if: github.event.pull_request.merged == true | |
| name: 编译构建 | |
| runs-on: windows-latest | |
| steps: | |
| - name: 克隆代码 | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.sha }} | |
| - name: 安装Node环境 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: 安装依赖 | |
| run: npm ci | |
| - name: 读取package.json | |
| uses: rexdefuror/[email protected] | |
| - name: 打包构建 | |
| run: npm run build:win | |
| - name: 发布Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: v${{ env.PACKAGE_VERSION }} | |
| name: ${{ env.PACKAGE_VERSION }} | |
| draft: true | |
| prerelease: false | |
| body_path: NEW.md | |
| files: | | |
| ./dist/*.exe | |
| ./dist/*.blockmap | |
| ./dist/*.zip | |
| ./dist/latest.yml |