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
14 changes: 11 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ jobs:
if: "${{!contains(github.event.head_commit.message, 'skip ci') && !contains(github.event.head_commit.message, 'Release: Version Updates')}}"
needs: [setup]
runs-on: ubuntu-latest
outputs:
has_changes: ${{ steps.changes.outputs.has_changes }}
permissions:
contents: write # Required for git push and creating tags
pull-requests: write # Required for creating pull requests
Expand Down Expand Up @@ -99,8 +101,10 @@ jobs:
yarn config set npmAuthToken "${{ secrets.NPM_TOKEN }}"
git config user.email ${{ secrets.GH_EMAIL }}
git config user.name ${{ secrets.GH_USER }}
# Reset .yarnrc.yml to prevent committing
git checkout -- .yarnrc.yml

- name: Store initial commit SHA
id: initial-sha
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT

- name: Version Packages
run: |
Expand All @@ -109,10 +113,14 @@ jobs:
- name: Check for Version Changes
id: changes
run: |
if [ "$(git rev-list --count HEAD^..HEAD)" -eq 0 ]; then
INITIAL_SHA="${{ steps.initial-sha.outputs.sha }}"
CURRENT_SHA=$(git rev-parse HEAD)
if [ "$INITIAL_SHA" = "$CURRENT_SHA" ]; then
echo "has_changes=false" >> $GITHUB_OUTPUT
echo "No new commits created by version step"
else
echo "has_changes=true" >> $GITHUB_OUTPUT
echo "New commits created by version step"
fi

- name: Publish
Expand Down