Skip to content

Commit

Permalink
feat(icons): [publish_preview] wtf
Browse files Browse the repository at this point in the history
  • Loading branch information
ByronDWall committed Dec 10, 2024
1 parent d826d97 commit df44c6d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/preview-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ jobs:

- name: Validate branch name
run: |
BRANCH_NAME=$(echo "${GITHUB_REF#refs/heads/}" | tr '/' '-')
if [[ ! "$BRANCH_NAME" =~ ^preview/[a-zA-Z0-9_-]+$ ]]; then
if contains(github.event.head_commit.message, '[publish_preview]'); then
echo "Ignoring PR because of the branch name. Exiting workflow."
exit 1
fi
Expand Down Expand Up @@ -84,7 +83,7 @@ jobs:

# Publish preview releases only if the branch starts with "preview/" and the commit message contains "[publish_preview]"
- name: Publishing preview releases to npm registry
if: startsWith(github.ref, 'refs/heads/preview/') && contains(github.event.head_commit.message, '[publish_preview]')
if: contains(github.event.head_commit.message, '[publish_preview]')
run: |
BRANCH_NAME=$(echo "${GITHUB_REF#refs/heads/}" | tr '/' '-')
git checkout ${{ github.head_ref }}
Expand Down

0 comments on commit df44c6d

Please sign in to comment.