Skip to content
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

Development #16

Merged
merged 2 commits into from
Nov 5, 2023
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
16 changes: 5 additions & 11 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,34 +32,28 @@ jobs:
uses: actions/checkout@v4

- name: Extract release version from Pull Request title
id: extract_version_from_pr_title
id: extract-version-from-pr-title
if: ${{ !github.event.inputs.version && github.event.pull_request.merged }}
run: |
pr_title="${{ github.event.pull_request.title }}"
if echo "$pr_title" | grep -E -o "[0-9]+\.[0-9]+\.[0-9]+"; then
version="${BASH_REMATCH}"
echo "version=$version" >> $GITHUB_OUTPUT
fi
echo ${{ steps.extract_version_from_pr_title.outputs.version }}
echo "::set-output name=version::$version"
echo ${{ steps.extract_version_from_pr_title.outputs.version }}

- name: Determine incremented release version
id: determine_incremented_release_version
if: ${{ !github.event.inputs.version }}
id: determine-incremented-release-version
if: ${{ !github.event.inputs.version && !steps.extract-version-from-pr-title.outputs.version }}
uses: reecetech/version-increment@2023.9.3
with:
scheme: semver
increment: ${{ github.event.inputs.increment_type }}

- name: Create release
uses: softprops/action-gh-release@v1
needs:
- extract_version_from_pr_title
- determine_incremented_release_version
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ github.event.inputs.version ||
steps.extract_version_from_pr_title.outputs.version ||
steps.determine_incremented_release_version.outputs.version }}
steps.extract-version-from-pr-title.outputs.version ||
steps.determine-incremented-release-version.outputs.version }}
generate_release_notes: true