Merge pull request #349 from polkadot-ui/release-utils-0.0.2 #54
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 Assets | |
on: | |
push: | |
branches: [main] | |
jobs: | |
npm-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 8 | |
- run: pnpm install | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
registry-url: https://registry.npmjs.org | |
cache: "pnpm" | |
# Build the package if new version is available. | |
- name: Build Package | |
run: pnpm run build | |
working-directory: "packages/assets" | |
# Publish a package build from `dist` folder. Only runs if the package is a new version. | |
- name: Publish Package From Build | |
run: npm publish | |
working-directory: "packages/assets/dist" | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |