Skip to content

Commit a43e192

Browse files
committed
adding release and branch permission
1 parent a4894cc commit a43e192

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/publish.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ jobs:
2222
publish:
2323
runs-on: ubuntu-latest
2424
# Only allow publishing from master branch
25-
if: github.ref == 'refs/heads/master'
25+
# TODO: Remove publish-actin before merging
26+
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/publish-actin'
2627
permissions:
2728
contents: write
2829
steps:
@@ -63,6 +64,16 @@ jobs:
6364
env:
6465
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6566

67+
- name: Create GitHub Release
68+
if: ${{ inputs.dry_run == false }}
69+
run: |
70+
VERSION=$(node -p "require('./package.json').version")
71+
gh release create "v$VERSION" \
72+
--title "v$VERSION" \
73+
--generate-notes
74+
env:
75+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
76+
6677
- name: Dry run summary
6778
if: ${{ inputs.dry_run == true }}
6879
run: |

0 commit comments

Comments
 (0)