Skip to content
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
29 changes: 23 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,38 @@ jobs:
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'


# - name: Run release-it
# id: release_step
# run: |
# git pull origin main
#
# VERSION=$(release-it --ci --release-version)
# echo $VERSION
# echo "version=$VERSION" >> $GITHUB_OUTPUT
#
# OUTPUT=$(release-it --ci)
# echo "$OUTPUT"
#
# DRAFT_TAG=$(echo "$OUTPUT" | grep -oE 'untagged-[a-z0-9]+')
# echo $DRAFT_TAG
# echo "draft_tag=$DRAFT_TAG" >> $GITHUB_OUTPUT
# env:
# GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
- name: Run release-it
id: release_step
run: |
git pull origin main

VERSION=$(release-it --ci --release-version)
echo $VERSION
echo "version=$VERSION" >> $GITHUB_OUTPUT

# Run release-it in CI mode (bump version, commit, tag, changelog, GitHub release)
OUTPUT=$(release-it --ci)
echo "$OUTPUT"

# Extract the new version
VERSION=$(echo "$OUTPUT" | grep -oP '(?<=Bumping version: ).*')
echo "version=$VERSION" >> $GITHUB_OUTPUT

# Extract draft tag if any
DRAFT_TAG=$(echo "$OUTPUT" | grep -oE 'untagged-[a-z0-9]+')
echo $DRAFT_TAG
echo "draft_tag=$DRAFT_TAG" >> $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
Expand Down
Loading