Merge pull request #103 from GenerationSoftware/world-support #196
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish React Hooks | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'packages/hyperstructure-react-hooks/**' | |
| jobs: | |
| check: | |
| name: Check package.json version | |
| runs-on: ubuntu-latest | |
| outputs: | |
| changed: ${{ steps.check.outputs.changed }} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v3 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18.x' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Check version | |
| id: check | |
| uses: EndBug/version-check@v2 | |
| with: | |
| file-name: ./packages/hyperstructure-react-hooks/package.json | |
| file-url: https://unpkg.com/@generationsoftware/hyperstructure-react-hooks@latest/package.json | |
| static-checking: localIsNew | |
| publish: | |
| name: Publish new package version to NPM | |
| runs-on: ubuntu-latest | |
| needs: check | |
| if: needs.check.outputs.changed == 'true' | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v3 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18.x' | |
| registry-url: 'https://registry.npmjs.org' | |
| - uses: pnpm/action-setup@v2 | |
| with: | |
| version: 8.12.1 | |
| - name: Install | |
| run: pnpm i | |
| working-directory: ./packages/hyperstructure-react-hooks | |
| - name: Publish | |
| run: pnpm publish | |
| working-directory: ./packages/hyperstructure-react-hooks | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_KEY }} |