Skip to content

Commit

Permalink
Update cut_release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tyuchn authored Oct 25, 2023
1 parent e7f7466 commit 40b10b1
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/cut_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,33 @@ jobs:
ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: '0'

- name: Filter tags
id: filter_tags
run: |
# Define the major and minor version you're interested in
major_minor_version="1.3"
# Get the latest tag that matches the major and minor version
latest_tag=""
for tag in ${{ steps.get_latest_tag.outputs.tags }}; do
if [[ "$tag" == "v${major_minor_version}."* ]]; then
latest_tag="$tag"
break
fi
done
echo "Latest tag for $major_minor_version: $latest_tag"
echo "::set-output name=latest_tag::$latest_tag"
shell: bash

- name: Bump version and push tag
id: bump_version_and_push_tag
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # if you don't want to set write permissions use a PAT token
WITH_V: true
DEFAULT_BUMP: patch
CUSTOM_TAG: v1.3.5
CUSTOM_TAG: ${{ steps.filter_tags.outputs.latest_tag }}
# DEFAULT_BRANCH: release-1.3
# RELEASE_BRANCHES: release-1.3
# INITIAL_VERSION: 1.3.0
Expand Down

0 comments on commit 40b10b1

Please sign in to comment.