From 83eba75c1f2125eaa39a311c9c18a715b28c4f35 Mon Sep 17 00:00:00 2001 From: Tingluo Huang Date: Thu, 28 Sep 2023 16:51:47 +0000 Subject: [PATCH] Require pass release version during workflow_dispatch trigger. --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f47f26..af29837 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,6 +2,10 @@ name: CI on: workflow_dispatch: + inputs: + releaseVersion: + description: 'The next release version to use in the format of v1.x.x' + required: true push: branches: - main @@ -32,6 +36,6 @@ jobs: - name: Release if: github.event_name == 'workflow_dispatch' run: | - gh release create v${{github.sha}} --generate-notes ./_layout/action-versions.zip ./_layout/action-versions.tar.gz + gh release create ${{github.event.inputs.releaseVersion}} --generate-notes ./_layout/action-versions.zip ./_layout/action-versions.tar.gz env: GH_TOKEN: ${{ github.token }}