-
-
Notifications
You must be signed in to change notification settings - Fork 5
feat: create ci-package-manager.yml
#25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
20c0eb9
feat: create `ci-package-manager.yml`
lumirlumir 6b64a50
wip
lumirlumir df0d532
wip
lumirlumir 438a06a
fix
lumirlumir c0c898d
Merge branch 'main' of https://github.com/eslint/workflows into ci-cr…
lumirlumir 03f0466
wip: update dependencies to latest
lumirlumir 0580215
wip
lumirlumir a99c689
wip
lumirlumir 38e4c5b
wip: update build tarball command
lumirlumir File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,154 @@ | ||
| name: ci-package-manager | ||
|
|
||
| # This workflow creates a tarball from repo sources. | ||
| # It then checks that each of the following package managers is able to install: | ||
| # - npm | ||
| # - Yarn v1 Classic | ||
| # - Yarn (Modern) | ||
| # - pnpm | ||
| # - bun | ||
|
|
||
| on: | ||
| workflow_call: | ||
|
|
||
| jobs: | ||
| build-tarball: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Check out repo | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: "lts/*" | ||
|
|
||
| - name: Install dependencies | ||
| run: npm install | ||
|
|
||
| - name: Build tarball | ||
| run: npm pack --workspace packages 2>/dev/null || npm pack | ||
|
|
||
| - name: Upload build artifact | ||
| uses: actions/upload-artifact@v5 | ||
|
lumirlumir marked this conversation as resolved.
|
||
| with: | ||
| name: build | ||
| path: "*.tgz" | ||
| retention-days: 1 | ||
|
|
||
| npm-install: | ||
| needs: build-tarball | ||
|
|
||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Download build artifact | ||
| uses: actions/download-artifact@v6 | ||
| with: | ||
| name: build | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: "lts/*" | ||
|
|
||
| - name: npm install | ||
| run: | | ||
| npm install ./*.tgz -D | ||
|
lumirlumir marked this conversation as resolved.
|
||
|
|
||
| yarn-v1-install: | ||
| needs: build-tarball | ||
|
|
||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Download build artifact | ||
| uses: actions/download-artifact@v6 | ||
| with: | ||
| name: build | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: "lts/*" | ||
|
|
||
| - name: yarn add | ||
| run: | | ||
| yarn add ./*.tgz -D | ||
|
lumirlumir marked this conversation as resolved.
|
||
|
|
||
| yarn-install: | ||
| needs: build-tarball | ||
|
|
||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Download build artifact | ||
| uses: actions/download-artifact@v6 | ||
| with: | ||
| name: build | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: "lts/*" | ||
|
|
||
| - name: Install Corepack latest | ||
| run: | | ||
| npm install -g corepack@latest | ||
|
lumirlumir marked this conversation as resolved.
|
||
| corepack enable yarn | ||
|
|
||
| - name: yarn add | ||
| run: | | ||
| corepack use yarn@latest | ||
|
lumirlumir marked this conversation as resolved.
|
||
| yarn init -p | ||
| yarn add ./*.tgz -D | ||
|
lumirlumir marked this conversation as resolved.
|
||
| env: | ||
| YARN_ENABLE_IMMUTABLE_INSTALLS: 0 # Allow installs to modify lockfile | ||
|
|
||
| pnpm-install: | ||
| needs: build-tarball | ||
|
|
||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Download build artifact | ||
| uses: actions/download-artifact@v6 | ||
| with: | ||
| name: build | ||
|
|
||
| - name: Install pnpm | ||
| uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: latest | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: "lts/*" | ||
|
|
||
| - name: pnpm add | ||
| run: | | ||
| cat > .npmrc <<EOT | ||
| auto-install-peers=true | ||
| node-linker=hoisted | ||
| EOT | ||
|
lumirlumir marked this conversation as resolved.
|
||
| pnpm add ./*.tgz -D | ||
|
lumirlumir marked this conversation as resolved.
|
||
|
|
||
| bun-install: | ||
| needs: build-tarball | ||
|
|
||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Download build artifact | ||
| uses: actions/download-artifact@v6 | ||
| with: | ||
| name: build | ||
|
|
||
| - name: Set up Bun | ||
| uses: oven-sh/setup-bun@v2 | ||
|
|
||
| - name: bun install | ||
| run: | | ||
| bun install ./*.tgz -D | ||
|
lumirlumir marked this conversation as resolved.
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.