Add repository field to package json #9
This file contains hidden or 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 previewer to npm | |
| on: | |
| push: | |
| branches: ['master'] | |
| tags: ['v*'] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| environment: production | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: 20 | |
| registry-url: https://registry.npmjs.org | |
| cache: pnpm | |
| - name: Install Dependencies | |
| run: pnpm i --frozen-lockfile | |
| - name: Generate Version and Build | |
| run: ./build-previewer.sh | |
| - name: Publish to npm | |
| run: pnpm publish --access public --provenance --no-git-checks build/output |