File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 1010 - ' .vscode/**'
1111 - ' .idea/**'
1212 workflow_dispatch :
13+ inputs :
14+ production_release :
15+ description : ' Production release?'
16+ required : true
17+ default : ' true'
18+
19+ concurrency : create-release
1320
1421permissions :
1522 contents : write # to be able to publish a GitHub release
4451 runs-on : [ubuntu-20.04]
4552 needs :
4653 - ci
47- name : Test semantic release
54+ name : Create release
4855 steps :
4956 - uses : actions/checkout@v4
5057 with :
5562 with :
5663 node-version : 20
5764
65+ - name : Get branch name
66+ shell : bash
67+ run : echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
68+ id : get_branch
69+
5870 - name : install app dependencies
5971 run : npm install
6072
6375 env :
6476 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6577
78+ - name : create pre-release
79+ if : steps.get_branch.outputs.branch == 'main' && inputs.production_release != 'true'
80+ env :
81+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
82+ run : npx semantic-release --preid beta
83+
6684 - name : create release
85+ if : steps.get_branch.outputs.branch == 'main' && inputs.production_release == 'true'
6786 env :
6887 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6988 run : npx semantic-release
You can’t perform that action at this time.
0 commit comments