From ad0a33daad64f0734a9137f211aaa3c80ad73c9d Mon Sep 17 00:00:00 2001 From: 283375 Date: Wed, 25 Jun 2025 23:43:46 +0800 Subject: [PATCH] ci: tag regex --- .github/workflows/build-and-draft-release.yml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-and-draft-release.yml b/.github/workflows/build-and-draft-release.yml index 3ef33a2..df32320 100644 --- a/.github/workflows/build-and-draft-release.yml +++ b/.github/workflows/build-and-draft-release.yml @@ -4,7 +4,9 @@ on: workflow_dispatch: push: tags: - - "v[0-9]+.[0-9]+.[0-9]+" + # regex taken from + # https://packaging.python.org/en/latest/specifications/version-specifiers/#appendix-parsing-version-strings-with-regular-expressions + - '^([1-9][0-9]*!)?(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))*((a|b|rc)(0|[1-9][0-9]*))?(\.post(0|[1-9][0-9]*))?(\.dev(0|[1-9][0-9]*))?$' permissions: contents: write @@ -29,14 +31,6 @@ jobs: pip install build python -m build - - name: Remove `v` in tag name - uses: mad9000/actions-find-and-replace-string@5 - id: tagNameReplaced - with: - source: ${{ github.ref_name }} - find: "v" - replace: "" - - name: Draft a release uses: softprops/action-gh-release@v2 with: @@ -44,5 +38,4 @@ jobs: draft: true generate_release_notes: true files: | - dist/arcaea_offline_ocr-${{ steps.tagNameReplaced.outputs.value }}*.whl - dist/arcaea-offline-ocr-${{ steps.tagNameReplaced.outputs.value }}.tar.gz + dist/*