-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RE-3058 Adding support for generating .tool-versions default file
- Loading branch information
1 parent
ef77174
commit 1a50e2f
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,5 @@ | ||
--- | ||
"ci-prettier": patch | ||
--- | ||
|
||
Adding support for creating default .tool-versions file |
This file contains 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 |
---|---|---|
|
@@ -21,6 +21,11 @@ inputs: | |
description: "" | ||
required: false | ||
default: ".tool-versions" | ||
nodejs-version: | ||
description: | ||
"NodeJS version used only if the node-version-file isn't provided" | ||
required: false | ||
default: "^20.16.0" | ||
pnpm-version: | ||
description: "" | ||
required: false | ||
|
@@ -54,6 +59,13 @@ runs: | |
with: | ||
fetch-depth: ${{ inputs.checkout-repo-fetch-depth }} | ||
|
||
- name: Create .tool-versions file if it doesn't exist | ||
shell: bash | ||
run: | | ||
if [ ! -f "${{ inputs.node-version-file }}" ]; then | ||
echo "nodejs ${{ inputs.nodejs-version }}" > ${{ inputs.node-version-file }} | ||
fi | ||
- name: Setup nodejs | ||
uses: smartcontractkit/.github/actions/setup-nodejs@5b1046c28343660ecb84844c6fa95a66d1cdb52e # [email protected] | ||
with: | ||
|