fix: Dev server fixes (#8211) #4915
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: release-please | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| create-release: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| release_created: ${{ steps.release.outputs.release_created }} | |
| steps: | |
| - uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1 | |
| id: get-token | |
| with: | |
| private-key: ${{ secrets.TOKENS_PRIVATE_KEY }} | |
| app-id: ${{ secrets.TOKENS_APP_ID }} | |
| - uses: GoogleCloudPlatform/release-please-action@v4 | |
| id: release | |
| with: | |
| token: ${{ steps.get-token.outputs.token }} | |
| release-type: node | |
| package-name: netlify-cli | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: write | |
| pull-requests: write | |
| needs: create-release | |
| if: ${{ needs.create-release.outputs.release_created }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Read primary Node version | |
| id: node | |
| run: echo "version=$(yq eval '.primary_node_version' .github/test-matrix.yml)" >> "$GITHUB_OUTPUT" | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ steps.node.outputs.version }} | |
| cache: npm | |
| registry-url: 'https://registry.npmjs.org' | |
| # Use npm@10 due to https://github.com/npm/cli/issues/8489 and https://github.com/npm/cli/issues/8767 | |
| - name: Setup npm version | |
| run: npm install -g npm@10 | |
| - name: Install core dependencies | |
| run: npm ci --no-audit | |
| - name: Build project | |
| run: npm run build | |
| - name: Publish netlify-cli package | |
| run: npm publish --provenance | |
| env: | |
| NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
| - name: Prepare netlify package | |
| run: node scripts/netlifyPackage.js | |
| - name: Publish netlify package | |
| run: npm publish --provenance | |
| env: | |
| NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |