Publish on NPM #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish on NPM | |
on: | |
workflow_dispatch: | |
jobs: | |
publish-to-npm: | |
name: Publish to NPM | |
runs-on: ubuntu-latest | |
environment: | |
name: npm | |
url: https://www.npmjs.com/package/@morpho-org/metamorpho | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: ./.github/actions/install | |
- name: Build package | |
run: yarn build:pkg | |
- name: Publish to npm | |
run: | | |
cp LICENSE README.md package.json dist/ | |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | |
yarn publish dist --access public --ignore-scripts |