Skip to content

Publish Package to npmjs #4

Publish Package to npmjs

Publish Package to npmjs #4

Workflow file for this run

name: Publish Package to npmjs
on:
release:
types: [published]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: tibdex/github-app-token@32691ba7c9e7063bd457bd8f2a5703138591fa58 # v1
id: generate-token
with:
app_id: ${{ secrets.PR_APP_ID }}
private_key: ${{ secrets.PR_APP_PRIVATE_KEY }}
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
name: Checkout repository
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
name: Use Node.js 20.x
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
scope: '@fragment-dev'
- name: Install dependencies
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3
with:
retry_on: error
timeout_minutes: 5
max_attempts: 2
command: yarn
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}