Skip to content

Commit 5ac1622

Browse files
authored
Branch release skip main (#80)
Branch releases were running on main (checkout, install build, prepare, etc) until the very last line where if not main branch publish. This should exclude the entire run for main branch (save some unnecessary resource waste).
1 parent 5756051 commit 5ac1622

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/branch-release.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
name: Branch Release
22

33
on:
4-
push
4+
push:
5+
branches:
6+
- '**'
7+
- '!main'
58

69
jobs:
710
branch-release:
@@ -64,7 +67,6 @@ jobs:
6467
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc
6568
6669
- name: Publish with npm
67-
if: ${{ github.ref_name != 'main' }}
6870
run: npm publish --access public --tag beta
6971
env:
7072
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)