From 304118c98e6f86e5f2039a843b9618f60bea9e12 Mon Sep 17 00:00:00 2001 From: yanyongyu Date: Sat, 8 Jan 2022 18:23:17 +0800 Subject: [PATCH] :construction_worker: fix ci --- .github/workflows/release-github.yml | 16 ++++++++++++---- .github/workflows/release-plugin-docs.yml | 5 +++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-github.yml b/.github/workflows/release-github.yml index 32ac17ec..d4fbc473 100644 --- a/.github/workflows/release-github.yml +++ b/.github/workflows/release-github.yml @@ -9,20 +9,28 @@ on: 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 - if: github.ref == 'refs/heads/master' 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 - if: startsWith(github.ref, 'refs/tags/') with: - name: Release v${GITHUB_REF#refs/tags/} 🌈 - tag: ${GITHUB_REF#refs/tags/} + name: Release ${{ env.TAG_NAME }} 🌈 + tag: ${{ env.TAG_NAME }} publish: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-plugin-docs.yml b/.github/workflows/release-plugin-docs.yml index 84fa8189..66034f44 100644 --- a/.github/workflows/release-plugin-docs.yml +++ b/.github/workflows/release-plugin-docs.yml @@ -1,8 +1,9 @@ name: Release Nonebot Plugin Docs on: - release: - types: [ published ] + push: + tags: + - v* jobs: build: