Skip to content

ci(auto-release): Allow pre-releases in auto release #11769

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading