This commit is contained in:
Joseph Garrone 2020-05-14 04:16:52 +02:00
parent fd2f0d82ad
commit d33f250503
3 changed files with 5 additions and 5 deletions

View file

@ -34,10 +34,7 @@ jobs:
publish_npm: publish_npm:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: update_changelog_and_sync_package_lock_version needs: update_changelog_and_sync_package_lock_version
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Remove branch 'latest' - name: Remove branch 'latest'
continue-on-error: true continue-on-error: true
@ -61,8 +58,11 @@ jobs:
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:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Commit changes - name: Commit changes
run: | run: |
git config --local user.email "ts_ci@github.com" git config --local user.email "ts_ci@github.com"

1
.npmrc
View file

@ -1 +0,0 @@
//registry.npmjs.org/:_authToken=${NPM_TOKEN}

View file

@ -17,6 +17,7 @@ The following Secrets need to be set to be able to publish.
# NOTES: # NOTES:
- The template does not support ``.npmignore`` use ``package.json`` ``files`` instead. - The template does not support ``.npmignore`` use ``package.json`` ``files`` instead.
- The template does not support ``.npmrc``
- Don't forget to update the ``package.json`` ``files`` entry to specify the files you would like to be included in the NPM bundle. - Don't forget to update the ``package.json`` ``files`` entry to specify the files you would like to be included in the NPM bundle.
- The dev dependency ``evt`` is just used as an utility in the demo ``/src/test/`` directory. - The dev dependency ``evt`` is just used as an utility in the demo ``/src/test/`` directory.
- The dev dependency ``denoify`` is needed for the NPM script ``enable_short_import_path``. - The dev dependency ``denoify`` is needed for the NPM script ``enable_short_import_path``.