mirror of
https://github.com/whyour/qinglong.git
synced 2025-10-28 15:16:07 +08:00
53 lines
1.1 KiB
YAML
53 lines
1.1 KiB
YAML
name: Build Release Packages
|
|
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- "*.md"
|
|
tags:
|
|
- "v*"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: pnpm/action-setup@v3
|
|
with:
|
|
version: "8.3.1"
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "18"
|
|
cache: "pnpm"
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pnpm install
|
|
pnpm install -g pkg
|
|
|
|
- name: Install zip tool
|
|
run: sudo apt-get install -y zip
|
|
|
|
- name: Build release packages
|
|
run: node build-release.js
|
|
|
|
- name: Upload release artifacts
|
|
uses: actions/upload-artifact@v5
|
|
with:
|
|
name: release-packages
|
|
path: dist/*.zip
|
|
retention-days: 7
|
|
|
|
- name: Create GitHub Release
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
artifacts: "dist/*.zip"
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
generateReleaseNotes: true
|