File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,19 +36,22 @@ jobs:
3636 echo "VERSION=$VERSION" >> $GITHUB_ENV
3737 echo "BRANCH=$BRANCH" >> $GITHUB_ENV
3838 echo "Version $VERSION"
39+ test $BRANCH = "stable" && export STABLE=true || export NOT_STABLE=true
40+ echo "STABLE=$STABLE" >> $GITHUB_ENV
41+ echo "NOT_STABLE=$NOT_STABLE" >> $GITHUB_ENV
3942 - name : Generate artifacts.json NPM
4043 run : |
4144 python predeployed/utils/generate_artifacts.py
4245 cp predeployed/utils/data/artifacts.json .
4346 - name : Publish on npm
44- if : github.ref != 'refs/heads/stable'
47+ if : ${{ env.NOT_STABLE }}
4548 run : |
4649 npm version --no-git-tag-version ${{ env.VERSION }}
4750 npm publish --access public --tag ${{ env.BRANCH }}
4851 env :
4952 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
5053 - name : Publish on npm (stable)
51- if : github.ref == 'refs/heads/stable'
54+ if : ${{ env.STABLE }}
5255 run : |
5356 npm publish --access public
5457 env :
You can’t perform that action at this time.
0 commit comments