💚 ci: 流 #4
Workflow file for this run
This file contains hidden or 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: Release to GitHub | |
on: | |
push: | |
tags: | |
- 'v*' # 匹配"v1.0.0"、"v1.0.0-alpha"等发布标签 | |
branches: ['master'] | |
permissions: | |
contents: write # 如果您的包发布到 GitHub Packages,则需要此权限 | |
packages: write # 如果您的包发布到 GitHub Packages,则需要此权限 | |
jobs: | |
build: | |
name: Create Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
# 修改发布说明为最新提交的提交信息 | |
body: | | |
${{ github.event.head_commit.message }} # 使用最新提交的提交信息作为发布说明 | |
${{ github.event.head_commit.url }} # 提供提交的链接 | |
${{ github.event.head_commit.author.name }} # 提供提交的作者 | |
draft: false | |
prerelease: false |