Files
Sensitive-lexicon/.github/workflows/main.yml
2025-07-29 00:27:59 +08:00

37 lines
894 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: 自动测试压缩
on:
push:
tags:
- '*'
workflow_dispatch:
inputs:
tag_name:
description: '请输入 tag 名(如 1.0'
required: true
default: '1.0'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: 拉取代码
uses: actions/checkout@v3
- name: 设置 Tag 和文件名
id: release_info
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
TAG_NAME="${{ github.event.inputs.tag_name }}"
else
TAG_NAME="${GITHUB_REF##*/}"
fi
FILE_NAME="Sensitive-lexicon-${TAG_NAME}.zip"
echo "tag_name=${TAG_NAME}" >> $GITHUB_OUTPUT
echo "file_name=${FILE_NAME}" >> $GITHUB_OUTPUT
- name: 压缩项目
run: |
zip -r ${{ steps.release_info.outputs.file_name }} . -x '*.git*'