File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -27,15 +27,25 @@ jobs:
2727 VERSION=0.0.0-nightly.$SHORT_SHA
2828 npm version $VERSION --no-git-tag-version
2929 echo "version=$VERSION" >> $GITHUB_ENV
30+ echo "version=$VERSION" >> $GITHUB_OUTPUT
31+
32+ - name : Publish nightly
33+ run : npm publish --tag nightly
34+ env :
35+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
3036
3137 - name : Check if version already exists
38+ id : check-version
3239 run : |
33- if npm view react-native-css@$version > /dev/null 2>&1; then
34- echo "Version $version already exists. Skipping publish."
35- exit 0
40+ if npm view react-native-css@${{ steps.set-version.outputs.version }} > /dev/null 2>&1; then
41+ echo "Version ${{ steps.set-version.outputs.version }} already exists. Skipping publish."
42+ echo "exists=true" >> $GITHUB_OUTPUT
43+ else
44+ echo "exists=false" >> $GITHUB_OUTPUT
3645 fi
3746
3847 - name : Publish nightly
48+ if : steps.check-version.outputs.exists == 'false'
3949 run : npm publish --tag nightly
4050 env :
41- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
51+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments