mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-28 05:49:02 +08:00
37 lines
793 B
YAML
37 lines
793 B
YAML
name: Release Drafter
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
tags:
|
|
- v*
|
|
|
|
jobs:
|
|
update-release-draft:
|
|
if: github.ref == 'refs/heads/master'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: release-drafter/release-drafter@v5
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
release:
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- run: |
|
|
echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
|
|
|
- uses: release-drafter/release-drafter@v5
|
|
with:
|
|
name: Release ${{ env.TAG_NAME }} 🌈
|
|
tag: ${{ env.TAG_NAME }}
|
|
publish: true
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|