Skip to content

Commit

Permalink
[skip version] updating gh action yml to have the new set-output format
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanrozich committed May 5, 2024
1 parent 65c8a47 commit ede1288
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,21 @@ jobs:

- name: Get last commit message
id: get-commit-message
run: echo "::set-output name=message::$(git log -1 --pretty=%B)"
run: echo "message=$(git log -1 --pretty=%B)" >> $GITHUB_OUTPUT
# This step retrieves the last commit message and sets it as an output

- name: Determine version bump type
id: version-bump-type
run: |
echo "Commit message: ${{ github.event.head_commit.message }}"
if echo "${{ github.event.head_commit.message }}" | grep -q "\[skip version\]"; then
echo "::set-output name=type::skip" # Skip version bump
echo "type=skip" >> $GITHUB_OUTPUT # Skip version bump
elif echo "${{ github.event.head_commit.message }}" | grep -q "MAJOR:"; then
echo "::set-output name=type::major" # Major version bump
echo "type=major" >> $GITHUB_OUTPUT # Major version bump
elif echo "${{ github.event.head_commit.message }}" | grep -q "MINOR:"; then
echo "::set-output name=type::minor" # Minor version bump
echo "type=minor" >> $GITHUB_OUTPUT # Minor version bump
else
echo "::set-output name=type::patch" # Patch version bump
echo "type=patch" >> $GITHUB_OUTPUT # Patch version bump
fi
# This step analyzes the commit message to determine the type of version bump

Expand Down

0 comments on commit ede1288

Please sign in to comment.