PixelStreamingInfrastructure/.github/workflows/publish-library-to-gh-packa...

29 lines
906 B
YAML

name: Publish library package to Github Packages
on:
push:
branches: ['gh-packages']
paths: ['Frontend/library/package.json']
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
defaults:
run:
working-directory: Frontend/library
steps:
# Based on: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages#publishing-packages-to-github-packages
- uses: actions/checkout@v3
# Setup .npmrc file to publish to GitHub Packages
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://npm.pkg.github.com'
always-auth: 'true'
- run: npm ci
- run: npm run build
- run: npm publish --access public --registry=https://npm.pkg.github.com/
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}