Skip to content

Merge branch 'main' of github.com:Shummy1991/package-test #72

Merge branch 'main' of github.com:Shummy1991/package-test

Merge branch 'main' of github.com:Shummy1991/package-test #72

name: Node.js Package
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
actions: write
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.PACKAGE_DEPLOYER_PAT }}
- uses: actions/setup-node@v3
with:
node-version: 17.0.0
registry-url: https://npm.pkg.github.com/
- run: |
git config --global user.name "Shummy1991"
git config --global user.email "[email protected]"
npm version patch -m "[skip ci] Increase version"
- run: node -e "const fs = require('fs'); const packageJson = require('./package.json'); packageJson.type = 'commonjs'; fs.writeFileSync('./package.json', JSON.stringify(packageJson, null, 2));"
- run: npm ci
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- run: git push
- run: gh workflow run 'Build Storybook' --repo 'shummy1991/package-test'
env:
GH_TOKEN: ${{ github.token }}