Skip to content

Update yarn.yml

Update yarn.yml #5

Workflow file for this run

name: NodeJS with Webpack
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
packages: write # Grants permission to publish packages
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.10.0]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: "https://npm.pkg.github.com/"
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build library
run: yarn build
- name: Publish to npm
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
yarn publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}