mirror of
https://github.com/garronej/ts-ci.git
synced 2025-11-30 21:43:05 +00:00
Update ci.yaml
This commit is contained in:
parent
e16e7f77be
commit
93c73f28a7
1 changed files with 3 additions and 5 deletions
8
.github/workflows/ci.yaml
vendored
8
.github/workflows/ci.yaml
vendored
|
|
@ -128,12 +128,12 @@ jobs:
|
||||||
- uses: actions/setup-node@v2.1.3
|
- uses: actions/setup-node@v2.1.3
|
||||||
with:
|
with:
|
||||||
node-version: '15'
|
node-version: '15'
|
||||||
|
registry-url: https://registry.npmjs.org/
|
||||||
- run: |
|
- run: |
|
||||||
PACKAGE_MANAGER=npm
|
PACKAGE_MANAGER=npm
|
||||||
if [ -f "./yarn.lock" ]; then
|
if [ -f "./yarn.lock" ]; then
|
||||||
PACKAGE_MANAGER=yarn
|
PACKAGE_MANAGER=yarn
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$PACKAGE_MANAGER" = "yarn" ]; then
|
if [ "$PACKAGE_MANAGER" = "yarn" ]; then
|
||||||
yarn install --frozen-lockfile
|
yarn install --frozen-lockfile
|
||||||
else
|
else
|
||||||
|
|
@ -149,13 +149,11 @@ jobs:
|
||||||
echo "This version is already published"
|
echo "This version is already published"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
if [ "$NPM_TOKEN" = "" ]; then
|
if [ "$NODE_AUTH_TOKEN" = "" ]; then
|
||||||
echo "Can't publish on NPM, You must first create a secret called NPM_TOKEN that contains your NPM auth token. https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets"
|
echo "Can't publish on NPM, You must first create a secret called NPM_TOKEN that contains your NPM auth token. https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets"
|
||||||
false
|
false
|
||||||
fi
|
fi
|
||||||
echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > .npmrc
|
|
||||||
npm publish
|
npm publish
|
||||||
rm .npmrc
|
|
||||||
env:
|
env:
|
||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
||||||
VERSION: ${{ needs.check_if_version_upgraded.outputs.to_version }}
|
VERSION: ${{ needs.check_if_version_upgraded.outputs.to_version }}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue