Skip to content

Commit b4b3aff

Browse files
committed
chore(ci): Run publish actions iff it's main
1 parent 0018a8e commit b4b3aff

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

Diff for: .github/workflows/publish-crates.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
name: "Publish cargo crates"
2828
runs-on: ubuntu-latest
2929
if: >-
30-
${{ startsWith(github.event.head_commit.message, 'chore: Publish') }}
30+
${{ github.ref == 'refs/heads/main' && startsWith(github.event.head_commit.message, 'chore: Publish') }}
3131
steps:
3232
- uses: actions/checkout@v4
3333

Diff for: .github/workflows/publish-npm-package.yml

+2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ jobs:
4646
check-if-build-required:
4747
name: Check if build is required
4848
runs-on: ubuntu-latest
49+
# Run only on main branch
50+
if: github.ref == 'refs/heads/main'
4951
outputs:
5052
need-build: ${{ steps.check.outputs.need-build }}
5153
steps:

Diff for: .github/workflows/publish.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ jobs:
4444
determine-nightly-version:
4545
name: "Determine nightly version"
4646
runs-on: ubuntu-latest
47-
47+
# Run only on main branch
48+
if: github.ref == 'refs/heads/main'
4849
outputs:
4950
version: ${{ steps.determine-nightly-version.outputs.version }}
5051
steps:

0 commit comments

Comments
 (0)