Skip to content

Commit bd32b26

Browse files
chore: adjust release process workflow
1 parent 5d87d9d commit bd32b26

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
name: Release
22
on:
3-
push:
4-
branches:
5-
- master
6-
- main
7-
- beta
3+
workflow_dispatch:
4+
inputs:
5+
dry_run:
6+
description: 'Run semantic-release in "dry run" mode'
7+
default: false
8+
type: boolean
9+
810
env:
911
NODE_OPTIONS: --max_old_space_size=4096
1012
jobs:
1113
release:
1214
name: Release
1315
runs-on: ubuntu-latest
16+
# GH does not allow to limit branches in the workflow_dispatch settings so this here is a safety measure
17+
if: ${{ github.ref_name == 'master' || github.ref_name == 'rc' || github.ref_name == 'release-v9' }}
1418
steps:
1519
- name: Checkout
1620
uses: actions/checkout@v3
@@ -28,4 +32,6 @@ jobs:
2832
env:
2933
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3034
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31-
run: yarn semantic-release
35+
run: >
36+
yarn semantic-release
37+
${{ inputs.dry_run && '--dry-run' || '' }}

0 commit comments

Comments
 (0)