mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-22 03:10:42 +08:00
46 lines
993 B
YAML
46 lines
993 B
YAML
name: 发布
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
workflow_dispatch:
|
|
inputs:
|
|
snapshot:
|
|
description: '仅测试构建(不发布)'
|
|
type: boolean
|
|
default: false
|
|
draft:
|
|
description: '创建草稿发布'
|
|
type: boolean
|
|
default: false
|
|
prerelease:
|
|
description: '标记为预发布'
|
|
type: boolean
|
|
default: false
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
env:
|
|
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 90
|
|
|
|
steps:
|
|
- name: 检出代码
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: 构建和发布
|
|
uses: ./.github/actions/build-release
|
|
with:
|
|
mode: ${{ inputs.snapshot && 'snapshot' || 'release' }}
|
|
go-version: '1.20'
|
|
retention-days: '90'
|
|
release-args: ${{ inputs.draft && '--draft' || '' }} ${{ inputs.prerelease && '--prerelease' || '' }}
|