Repository navigation
feat: use range from devEngines when no packageManager is set (#892)
#380
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 releases | |
| on: | |
| push: | |
| branches: [main] | |
| env: | |
| YARN_ENABLE_GLOBAL_CACHE: false | |
| permissions: | |
| contents: read | |
| jobs: | |
| release-please: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| outputs: | |
| release_created: ${{ steps.release.outputs.release_created }} | |
| release_tag: ${{ steps.release.outputs.tag_name }} | |
| steps: | |
| - uses: googleapis/release-please-action@db8f2c60ee802b3748b512940dde88eabd7b7e01 # v3.7.13 | |
| id: release | |
| with: | |
| release-type: node | |
| package-name: corepack | |
| bump-minor-pre-major: true # TODO: remove this when releasing v1.0.0. | |
| npm-publish: | |
| needs: release-please | |
| if: ${{ needs.release-please.outputs.release_created }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: lts/* | |
| env: | |
| SKIP_YARN_COREPACK_CHECK: 1 | |
| - name: Get the Yarn cache directory path | |
| id: yarn-cache-dir-path | |
| run: echo "dir=$(corepack yarn config get cacheFolder)" >> "$GITHUB_OUTPUT" | |
| - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: ${{steps.yarn-cache-dir-path.outputs.dir}} | |
| key: ${{runner.os}}-yarn-${{hashFiles('**/yarn.lock')}} | |
| restore-keys: | | |
| ${{runner.os}}-yarn- | |
| - run: corepack yarn install --immutable | |
| - name: Publish to the npm registry | |
| run: corepack yarn npm publish --provenance | |
| - run: corepack yarn pack --out corepack.tgz | |
| - name: Add Corepack package archive to GitHub release | |
| run: gh release upload ${{ needs.release-please.outputs.release_tag }} corepack.tgz | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |