1
0
mirror of https://github.com/pnpm/action-setup.git synced 2026-07-08 17:43:45 +08:00

Compare commits

..

10 Commits

Author SHA1 Message Date
Alex
a0014a882e Merge 29985b169f into b906affcce 2026-03-11 16:00:04 +01:00
Zoltan Kochan
b906affcce Revert "feat!: run the action on Node.js 24 (#205)"
This reverts commit 9b5745cdf0.
2026-03-11 15:54:42 +01:00
Zoltan Kochan
9b5745cdf0 feat!: run the action on Node.js 24 (#205) 2026-02-17 13:30:54 +01:00
Alexander Hornung
29985b169f Build 2026-02-05 13:24:45 +11:00
Alexander Hornung
4a8f7ada16 Revert old styling 2026-02-05 13:21:54 +11:00
Alexander Hornung
b2ad3f504b Remove unnecessary comments 2026-02-05 13:09:28 +11:00
Alexander Hornung
ab72e3e12e fix: check if pnpm already installed (#176) 2026-02-04 20:48:16 +11:00
Boosted-Bonobo
1e1c8eafbd ci: pin github actions (#199) 2025-12-15 14:31:35 +01:00
Khải
b9e1dbc72f fix(ci): exclude macos (#197) 2025-12-10 13:54:29 +01:00
Khải
61bc82c7df refactor: remove star imports (#196) 2025-12-10 13:14:52 +01:00
3 changed files with 27 additions and 16 deletions

View File

@@ -22,7 +22,7 @@ jobs:
- windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Run the action
uses: ./
@@ -51,7 +51,7 @@ jobs:
- windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Run the action
uses: ./
@@ -74,8 +74,8 @@ jobs:
fail-fast: false
matrix:
os:
# macos is excluded from this test because node 12 is no longer available on this platform
- ubuntu-latest
- macos-latest
- windows-latest
standalone:
@@ -83,7 +83,7 @@ jobs:
- false
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Run the action
uses: ./
@@ -92,7 +92,7 @@ jobs:
standalone: ${{ matrix.standalone }}
- name: install Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
# pnpm@7.0.0 is not compatible with Node.js 12
node-version: 12.22.12
@@ -160,7 +160,7 @@ jobs:
- yarn
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Run the action
uses: ./

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -1,16 +1,27 @@
import { setFailed, startGroup, endGroup } from '@actions/core'
import { Inputs } from '../inputs'
import runSelfInstaller from './run'
import { setFailed, startGroup, endGroup } from "@actions/core";
import { Inputs } from "../inputs";
import runSelfInstaller from "./run";
import { exec } from "child_process";
import { promisify } from "util";
export { runSelfInstaller }
export { runSelfInstaller };
const execAsync = promisify(exec);
export async function install(inputs: Inputs) {
startGroup('Running self-installer...')
const status = await runSelfInstaller(inputs)
endGroup()
try {
await execAsync("pnpm --version");
return;
} catch {}
startGroup("Running self-installer...");
const status = await runSelfInstaller(inputs);
endGroup();
if (status) {
return setFailed(`Something went wrong, self-installer exits with code ${status}`)
return setFailed(
`Something went wrong, self-installer exits with code ${status}`,
);
}
}
export default install
export default install;