Use peerDependencies for Sanity UI #14
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: build | |
on: | |
release: | |
types: [created] | |
push: | |
branches: | |
- '**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
registry-url: 'https://registry.npmjs.org' | |
- run: npm ci | |
- run: npm run build | |
- run: npm publish | |
# For now we only publish on tags here and assume the version number is already correct. | |
# If we change this then we need to automate updating the version number. | |
if: github.event_name == 'release' && github.event.action == 'created' | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |