Skip to content

Release

Release #7

Workflow file for this run

name: Release
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install pkg globally
run: npm install -g pkg
- name: Install pnpm globally
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Build for Windows
run: npm run build:win
- name: Package files
run: |
zip -r release.zip server.exe public
- name: List files
run: ls -al # 列出当前目录的文件,确认 ZIP 文件存在
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.event.release.tag_name }}
name: Release ${{ github.event.release.tag_name }}
body: |
This release includes the following assets:
- server.exe
- public
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ./release.zip