Skip to content

Publish on GitHub Packages #2

Publish on GitHub Packages

Publish on GitHub Packages #2

Workflow file for this run

# This action automatically publishes the package on GitHub Packages when something is pushed on develop
name: Publish on GitHub Packages
on:
push:
branches:
- develop
# This adds a button in the Actions tab to manually execute the action
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
# This checks out the repository to be accessible for the workflow - https://github.com/actions/checkout
- uses: actions/checkout@v4
# This is the command that will publish the package on the registry specified in package.json or .npmrc
# GITHUB_TOKEN allows us to authenticate without any personal access token
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}