feat: add various command documentation for bug fixing, checking scri… #3
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 NPM | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Checkout repository 🔔 | |
| uses: actions/checkout@v4 | |
| - name: Setup Deno 🦕 | |
| uses: denoland/setup-deno@v2 | |
| with: | |
| deno-version: v2.x | |
| - name: Extract version from deno.json 🏷️ | |
| id: get_version | |
| run: | | |
| VERSION=$(deno eval "console.log(JSON.parse(Deno.readTextFileSync('deno.json').replace(/\\/\\/.*/g, '')).version)") | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| echo "Version extracted: $VERSION" | |
| - name: Build npm package 🔨 | |
| run: deno run -A scripts/build_npm.ts ${{ env.VERSION }} | |
| - name: Setup Node.js 🔧 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22.x" | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Publish to npm 🎁 | |
| run: | | |
| cd npm | |
| npm publish --provenance --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |