init react #29
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: Node.js Package | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| publish-core: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions/setup-node@v2 | |
| with: | |
| node-version: 20 | |
| registry-url: https://registry.npmjs.org/ | |
| - name: Install dependencies | |
| working-directory: core | |
| run: npm install | |
| - name: Build | |
| working-directory: core | |
| run: npm run build | |
| - name: Publish to npm | |
| working-directory: core | |
| run: npm publish --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
| publish-elements: | |
| needs: publish-core | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions/setup-node@v2 | |
| with: | |
| node-version: 20 | |
| registry-url: https://registry.npmjs.org/ | |
| - name: Clear npm cache | |
| run: npm cache clean --force | |
| - name: Install dependencies | |
| working-directory: elements | |
| run: npm install @zoompinch/core@latest | |
| - name: Copy the local core package | |
| run: cp -r ../core ./node_modules/@zoompinch/core | |
| working-directory: elements | |
| - name: Build | |
| working-directory: elements | |
| run: npm run build | |
| - name: Publish to npm | |
| working-directory: elements | |
| run: npm publish --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
| publish-vue: | |
| needs: publish-core | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions/setup-node@v2 | |
| with: | |
| node-version: 20 | |
| registry-url: https://registry.npmjs.org/ | |
| - name: Clear npm cache | |
| run: npm cache clean --force | |
| - name: Install dependencies | |
| working-directory: vue | |
| run: npm install @zoompinch/core@latest | |
| - name: Copy the local core package | |
| run: cp -r ../core ./node_modules/@zoompinch/core | |
| working-directory: vue | |
| - name: Build | |
| working-directory: vue | |
| run: npm run build | |
| - name: Publish to npm | |
| working-directory: vue | |
| run: npm publish --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
| deploy-cloudflare: | |
| runs-on: ubuntu-latest | |
| needs: publish-vue | |
| env: | |
| CLOUDFLARE_PROJECT_NAME: zoompinch | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Clear npm cache | |
| run: npm cache clean --force | |
| - name: Install dependencies | |
| run: npm install @zoompinch/vue@latest | |
| working-directory: playground | |
| - name: Copy the local vue package | |
| run: cp -r ../vue ./node_modules/@zoompinch/vue | |
| working-directory: playground | |
| - name: Build playground | |
| run: npm run build | |
| working-directory: playground | |
| - name: Deploy to Cloudflare Pages | |
| run: npx wrangler pages deploy dist --project-name ${{ env.CLOUDFLARE_PROJECT_NAME }} --branch main | |
| working-directory: playground |