feat: 添加图片生成功能及相关配置 #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Release | |
on: | |
push: | |
tags: | |
- 'v*' # 当推送以 "v" 开头的标签时触发(如 v1.0.0, v2.1.0) | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: 检出代码库 | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# Step 2: 自动生成 Release | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref_name }} | |
release_name: ${{ github.ref_name }} | |
body: | | |
## Release Notes | |
- 自动发布版本。 | |
- 请根据需求更新对应内容。 | |
draft: false | |
prerelease: false | |
# Step 3: 可选,上传构建文件 | |
- name: Upload Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./your-build-file.zip # 替换为你的构建文件路径 | |
asset_name: your-build-file.zip # 替换为你的文件名 | |
asset_content_type: application/zip |