๐ Node.js ใใใฑใผใธใๅ ฌ้ใใใใใฎ GitHub Actions ใๆง็ฏใใ
react-emoji-textarea ใฎ้็บใ่กใฃใ้ใใชใชใผในใไฝๆใใใ่ชๅ็ใซ Node.js ใใใฑใผใธใซใฉใคใใฉใชใๅ ฌ้ใใใไป็ตใฟใใปใใใจ่ใใGitHub Actions ใงใใใๅฎ็พใใใใจใซใใพใใใ ใใฎ้ใๅ ฌๅผใตใคใใซ ๅ ฌ้ใใใฆใใๅ ๅฎน ใๅ่ใซ GitHub Actions ใไฝๆใใใฎใงใใใใใฎใพใพๅฉ็จใใใจ็งใฎ็ฐๅขใงใฏไธ่จใฎใจใฉใผใ็บ็ใใฆใใพใใพใใใ error Couldn't publish package: "https://registry.yarnpkg.com/@nikaera/react-emoji-textarea: You do not have permission to publish \"react-emoji-textarea\". Are you logged in as the correct user?" ไธ่จใฎใจใฉใผใซใคใใฆ่ชฟๆปใใชใใๆนไฟฎใใใจใใใๆ็ต็ใซไธ่จใฎ GitHub Actions ใง Node.js ใใใฑใผใธใๅ ฌ้ใงใใใใใซใชใใพใใใsecrets.NPM_TOKEN ใซใฏ NPM Token ใ็ป้ฒใใพใใ name: Node.js Package on: # workflow_dispatch ใ่ฟฝๅ ใใฆๆๅใงใๅฎ่กใงใใใใๆนไฟฎ workflow_dispatch: release: types: [created] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: node-version: "14.x" registry-url: "https://registry.npmjs.org" # registry.npmjs.org ใธใขใฏใปในใใ้ใฏๅฟ ใ่ช่จผใ่ฉฆใฟใใชใใทใงใณใ่ฟฝๅ always-auth: true # scope ใซใฏ่ชๅใฎใฆใผใถๅใๆๅฎ scope: "@nikaera" # .npmrc ใซ https://registry.npmjs.org ใขใฏใปในๆใซๅฉ็จใใ่ช่จผๆ ๅ ฑใ่จ่ผใใ - run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc - name: Build react-emoji-textarea ๐๐ run: | yarn install --frozen-lockfile yarn format yarn build - run: yarn publish --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}