chore(main): release json-viewer 4.0.1 #419
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: Release Please | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
name: 'Release Please' | |
runs-on: ubuntu-latest | |
outputs: | |
release_created: ${{ steps.release.outputs.release_created }} | |
steps: | |
- uses: googleapis/release-please-action@v4 | |
id: release | |
with: | |
token: ${{secrets.GITHUB_TOKEN}} | |
publish: | |
name: 'Publish @textea/json-viewer' | |
needs: release | |
if: needs.release.outputs.release_created | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Use Node.js LTS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Use Node.js LTS | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'pnpm' | |
- name: Install Dependencies | |
run: pnpm install | |
- name: Prepack | |
run: pnpm run prepack | |
- name: Build | |
run: npm run build | |
- name: Clean package.json | |
run: | | |
npm pkg delete scripts | |
npm pkg delete lint-staged | |
- name: Publish to npm | |
run: npm publish --provenance --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |