nonebot2/.github/workflows/release-github.yml

37 lines
793 B
YAML
Raw Normal View History

2021-12-02 03:17:10 +08:00
name: Release Drafter
on:
push:
branches:
- master
tags:
- v*
jobs:
update-release-draft:
2022-01-08 18:23:17 +08:00
if: github.ref == 'refs/heads/master'
2021-12-02 03:17:10 +08:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2022-01-08 18:23:17 +08:00
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
2021-12-02 03:17:10 +08:00
- uses: release-drafter/release-drafter@v5
with:
2022-01-08 18:23:17 +08:00
name: Release ${{ env.TAG_NAME }} 🌈
tag: ${{ env.TAG_NAME }}
2021-12-02 03:17:10 +08:00
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}