From 49f487293bda4fe0a3f5f45729f668023f06d7f8 Mon Sep 17 00:00:00 2001 From: s1gr1d Date: Wed, 24 Apr 2024 12:57:17 +0200 Subject: [PATCH] allow beta and alpha in auto release --- .github/workflows/auto-release.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index 54a74d6d6e5d..c9a373915974 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -20,20 +20,27 @@ jobs: # https://github.com/actions-ecosystem/action-regex-match - uses: actions-ecosystem/action-regex-match@v2 - id: version + id: version-regex with: # Parse version from head branch text: ${{ github.head_ref }} # match: preprare-release/xx.xx.xx regex: '^prepare-release\/(\d+\.\d+\.\d+)(?:-(alpha|beta)\.\d+)?$' + - name: Extract version + id: get_version + run: | + version=${{ steps.version-regex.outputs.match }} + version=${version/'prepare-release/'/''} + echo "version=$version" >> $GITHUB_OUTPUT + - name: Prepare release uses: getsentry/action-prepare-release@v1 - if: github.event.pull_request.merged == true && steps.version.outputs.match != '' + if: github.event.pull_request.merged == true && steps.version-regex.outputs.match != '' && steps.get_version.outputs.version != '' env: GITHUB_TOKEN: ${{ secrets.GH_RELEASE_PAT }} with: - version: ${{ steps.version.outputs.group1 }} + version: ${{ steps.get_version.outputs.version }} force: false merge_target: master craft_config_from_merge_target: true