Skip to content

Commit 1499b14

Browse files
author
Giuseppe Pennisi
committed
fix: change event on release
1 parent d669ad2 commit 1499b14

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

.github/workflows/publish.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
name: Publish on NPM
22
on:
3-
pull_request:
4-
branches:
5-
- master
6-
types: [ closed ]
7-
tags:
8-
- '*'
3+
release:
4+
types: [ published ]
95
jobs:
106
publish:
117
# Setup OS and Node Version
@@ -89,10 +85,7 @@ jobs:
8985

9086
- name: Deploy
9187
#if: github.event.pull_request.merged == true && contains(github.event.commits[0].message, '[skip-ci]') == false
92-
env:
93-
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
9488
run: |
95-
npm config set https://registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN
9689
LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
9790
arrIN=(${LATEST_TAG//_/ })
9891
LIBRARY=${arrIN[0]}
@@ -102,8 +95,10 @@ jobs:
10295
echo $VERSION
10396
if [ -d "$PWD/packages/$LIBRARY" ]; then
10497
cd $PWD/packages/$LIBRARY
105-
npm publish --no-git-tag-version --no-push --yes
98+
npm publish --no-git-tag-version --access=public
10699
cd ..
107100
cd ..
108101
fi
102+
env:
103+
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
109104

0 commit comments

Comments
 (0)