update readmes to show case functions as steps inside workflow (#12) #84
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-npm" | |
on: | |
release: | |
types: [created] | |
push: | |
branches: | |
- main | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 20 | |
registry-url: "https://registry.npmjs.org" | |
cache: "pnpm" | |
- run: pnpm install | |
working-directory: ./ | |
- run: pnpm -r --filter "./**" --filter "\!./" --parallel build | |
working-directory: ./ | |
- run: pnpm -r --filter "./**" --filter "\!./" publish --access public | |
working-directory: ./ | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
## See docs at https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages |