Skip to content

Update GitHub Packages configuration and workflow #3

Update GitHub Packages configuration and workflow

Update GitHub Packages configuration and workflow #3

name: Publish to GitHub Packages
on:
push:

Check failure on line 4 in .github/workflows/publish-package.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish-package.yml

Invalid workflow file

You have an error in your yaml syntax on line 4
branches: [ main ]
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://npm.pkg.github.com'
scope: '@zerrodevs'
- name: Install dependencies
run: npm install
- name: Build
run: npm run build --if-present
- name: Publish to GitHub Packages
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}