Skip to content

Commit a8dd652

Browse files
committed
CI: replace deprecated set-output command with GITHUB_ENV
1 parent f0ba004 commit a8dd652

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,13 @@ jobs:
6969
run: opam exec -- node scripts/ciTest.js -mocha -theme -format
7070

7171
- name: Get artifact info
72-
id: get_artifact_info
7372
run: node .github/workflows/get_artifact_info.js
7473

7574
- name: "Upload artifacts: binaries"
7675
uses: actions/upload-artifact@v3
7776
with:
78-
name: ${{ steps.get_artifact_info.outputs.artifact_name }}
79-
path: ${{ steps.get_artifact_info.outputs.artifact_path }}
77+
name: ${{ env.artifact_name }}
78+
path: ${{ env.artifact_path }}
8079

8180
- name: "Upload artifacts: lib/ocaml"
8281
if: runner.os == 'Linux'
@@ -140,7 +139,6 @@ jobs:
140139
working-directory: packages/std
141140

142141
- name: Get package info
143-
id: get_package_info
144142
# For pull requests, pass the correct commit SHA explicitly as GITHUB_SHA points to the wrong commit.
145143
run: node .github/workflows/get_package_info.js ${{ github.event.pull_request.head.sha }}
146144

@@ -149,8 +147,8 @@ jobs:
149147
with:
150148
name: npm-packages
151149
path: |
152-
${{ steps.get_package_info.outputs.rescript_package }}
153-
${{ steps.get_package_info.outputs.stdlib_package }}
150+
${{ env.rescript_package }}
151+
${{ env.stdlib_package }}
154152
155153
installationTest:
156154
needs: package
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
const fs = require("fs");
2+
13
const artifactPath =
24
process.platform === "darwin" && process.arch === "arm64"
35
? process.platform + process.arch
@@ -6,5 +8,7 @@ const artifactPath =
68
const artifactName = "binaries-" + artifactPath;
79

810
// Pass artifactPath and artifactName to subsequent GitHub actions
9-
console.log(`::set-output name=artifact_path::${artifactPath}`);
10-
console.log(`::set-output name=artifact_name::${artifactName}`);
11+
fs.appendFileSync(
12+
process.env.GITHUB_ENV,
13+
`artifact_path=${artifactPath}${os.EOL}artifact_name=${artifactName}${os.EOL}`
14+
);

.github/workflows/get_package_info.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@ fs.renameSync(rescriptPackagePath, rescriptArtifactName);
1616
fs.renameSync(stdlibPackagePath, stdlibArtifactName);
1717

1818
// Pass information to subsequent GitHub actions
19-
console.log(`::set-output name=rescript_package::${rescriptArtifactName}`);
20-
console.log(`::set-output name=stdlib_package::${stdlibArtifactName}`);
19+
fs.appendFileSync(
20+
process.env.GITHUB_ENV,
21+
`rescript_package=${rescriptArtifactName}${os.EOL}stdlib_package=${stdlibArtifactName}${os.EOL}`
22+
);

0 commit comments

Comments
 (0)