Skip to content

Update release.yml

Update release.yml #20

Workflow file for this run

jobs:
check-commit:
runs-on: ubuntu-latest
outputs:
should_release: ${{ steps.check.outputs.should_release }}
commit_message: ${{ steps.check.outputs.commit_message }}
steps:
- name: Checkout code
uses: actions/checkout@v4 # Changed from @4 to @v4
with:
fetch-depth: 1
- name: Check commit message
id: check
run: |
COMMIT_MESSAGE=$(git log -1 --pretty=%B)
echo "commit_message=$COMMIT_MESSAGE" >> $GITHUB_OUTPUT
if [[ $COMMIT_MESSAGE =~ ^feat!.* ]] || [[ $COMMIT_MESSAGE =~ ^feat:.* ]] || [[ $COMMIT_MESSAGE =~ ^fix:.* ]]; then
echo "should_release=true" >> $GITHUB_OUTPUT
else
echo "should_release=false" >> $GITHUB_OUTPUT
echo "No version bump needed (commit: $COMMIT_MESSAGE)"
fi
release:
needs: check-commit
if: needs.check-commit.outputs.should_release == 'true'
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4 # Changed from @4 to @v4
with:
fetch-depth: 0
- name: Setup Swift
uses: swift \