Skip to content

Commit

Permalink
chore: use correct branch check in condition #4
Browse files Browse the repository at this point in the history
  • Loading branch information
mfal committed Jun 10, 2024
1 parent df4a163 commit 63a9b7e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ jobs:
# See also https://nx.dev/ci/recipes/set-up/monorepo-ci-github-actions#configuring-ci-using-github-actions-and-nx
- name: Setup NX 2/2 🎛
if: |
!((!github.event.workflow_run.head_branch && github.ref == 'refs/heads/master') || github.event.workflow_run.head_branch == 'refs/remotes/origin/master') &&
!(github.event.workflow_run.head_branch == 'refs/remotes/origin/dev' || github.ref == 'refs/heads/dev')
!((!github.event.workflow_run.head_branch && github.ref == 'refs/heads/master') || github.event.workflow_run.head_branch == 'master') &&
!(github.event.workflow_run.head_branch == 'dev' || github.ref == 'refs/heads/dev')
run: git branch --track master origin/master

- name: Build 🔨
Expand All @@ -78,7 +78,7 @@ jobs:
- name: Version and publish (prod) 🚀
if: |
(!github.event.workflow_run.head_branch && github.ref == 'refs/heads/master') || github.event.workflow_run.head_branch == 'refs/remotes/origin/master'
(!github.event.workflow_run.head_branch && github.ref == 'refs/heads/master') || github.event.workflow_run.head_branch == 'master'
run: |
yarn lerna publish \
--conventional-commits \
Expand All @@ -89,8 +89,8 @@ jobs:
- name: Version and publish (dev) 🚀
if:
github.event.workflow_run.head_branch == 'refs/remotes/origin/dev' ||
github.ref == 'refs/heads/dev'
github.event.workflow_run.head_branch == 'dev' || github.ref ==
'refs/heads/dev'
run: |
yarn lerna publish 0.0.0-development-${GITHUB_SHA:0:7}-$(date +%Y%m%d) \
--message "chore(release): bump version to %v" \
Expand Down

0 comments on commit 63a9b7e

Please sign in to comment.