Skip to content

chore(github-actions): just publish if even throws exception #46

chore(github-actions): just publish if even throws exception

chore(github-actions): just publish if even throws exception #46

name: Publish to NPM
on:
push:
branches:
- master
jobs:
publish:
name: Publish @kubejs/${{ matrix.package_name }}
runs-on: ubuntu-latest
strategy:
matrix:
package_name:
- core
- plugin
- generator
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
- run: corepack enable
if: steps.calculate-hash.outputs.changed == 'true'
- run: yarn
if: steps.calculate-hash.outputs.changed == 'true'
- run: yarn workspace @kubejs/${{ matrix.package_name }} prepare
if: steps.calculate-hash.outputs.changed == 'true'
continue-on-error: true
- run: yarn workspace @kubejs/${{ matrix.package_name }} build
if: steps.calculate-hash.outputs.changed == 'true'
- run: |
sed -i 's/\$NODE_AUTH_TOKEN/${NODE_AUTH_TOKEN}/g' .yarnrc.yml
yarn workspace @kubejs/${{ matrix.package_name }} publish:me
if: steps.calculate-hash.outputs.changed == 'true'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
continue-on-error: true