Skip to content

Build

Build #4

Workflow file for this run

name: Build
on:
workflow_dispatch:
inputs:
version:
description: "Version"
required: true
type: string
env:
CARGO_TERM_COLOR: always
jobs:
Build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/[email protected]
- name: Build
run: |
pip install requests
python build.py ${{ github.event.inputs.version }} ${{ secrets.UPLOAD_SECRET }}
- name: Upload
uses: actions/[email protected]
with:
name: ${{ matrix.os }}-artifact
path: dist/*
Release:
needs: Build
runs-on: ubuntu-latest
steps:
- name: Download
uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: Release
uses: softprops/action-gh-release@v1
with:
files: dist/*
name: ${{ github.event.inputs.version }}
tag_name: ${{ github.event.inputs.version }}
draft: true
prerelease: false
body: |
### 更新
-
### 下载
| Windows | Linux | MacOS |
| :------------: | :------------: | :------------: |
| [x64](https://api.lance.fun/pkg/jump?id=liveserver&os=windows&arch=x86_64&version=${{ github.event.inputs.version }}&download=zip) | [x64](https://api.lance.fun/pkg/jump?id=liveserver&os=linux&arch=x86_64&version=${{ github.event.inputs.version }}&download=zip) | [Apple silicon](https://api.lance.fun/pkg/jump?id=liveserver&os=macos&arch=aarch64&version=${{ github.event.inputs.version }}&download=zip) |
| [x86](https://api.lance.fun/pkg/jump?id=liveserver&os=windows&arch=x86&version=${{ github.event.inputs.version }}&download=zip) | [x86](https://api.lance.fun/pkg/jump?id=liveserver&os=linux&arch=x86&version=${{ github.event.inputs.version }}&download=zip) | [Intel](https://api.lance.fun/pkg/jump?id=liveserver&os=macos&arch=x86_64&version=${{ github.event.inputs.version }}&download=zip) |
| [Arm64](https://api.lance.fun/pkg/jump?id=liveserver&os=windows&arch=aarch64&version=${{ github.event.inputs.version }}&download=zip) | [Arm64](https://api.lance.fun/pkg/jump?id=liveserver&os=linux&arch=aarch64&version=${{ github.event.inputs.version }}&download=zip) |
token: ${{ secrets.GHTOKEN }}