-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add NodeJS to windows and track its version (#864)
Signed-off-by: Damien Duportal <[email protected]>
- Loading branch information
Showing
2 changed files
with
62 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
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,61 @@ | ||
--- | ||
name: Bump NodeJS version | ||
|
||
scms: | ||
default: | ||
kind: github | ||
spec: | ||
user: "{{ .github.user }}" | ||
email: "{{ .github.email }}" | ||
owner: "{{ .github.owner }}" | ||
repository: "{{ .github.repository }}" | ||
token: "{{ requiredEnv .github.token }}" | ||
username: "{{ .github.username }}" | ||
branch: "{{ .github.branch }}" | ||
|
||
sources: | ||
lastReleaseVersion: | ||
kind: githubrelease | ||
name: Get the latest NodeJS version | ||
spec: | ||
owner: nodejs | ||
repository: node | ||
token: "{{ requiredEnv .github.token }}" | ||
username: "{{ .github.username }}" | ||
versionfilter: | ||
kind: regex | ||
pattern: v18.(\d*).(\d*) | ||
transformers: | ||
- trimprefix: v | ||
|
||
conditions: | ||
checkForPackage: | ||
kind: shell | ||
disablesourceinput: true # Do not pass source as argument to the command line | ||
spec: | ||
command: curl --fail --silent --show-error --location --head https://nodejs.org/dist/v{{ source "lastReleaseVersion" }}/node-v{{ source "lastReleaseVersion" }}.tar.gz | ||
checkForChocolateyPackage: | ||
kind: shell | ||
disablesourceinput: true # Do not pass source as argument to the command line | ||
spec: | ||
command: curl --silent --show-error --location --fail --output /dev/null https://community.chocolatey.org/packages/nodejs.install/{{ source "lastReleaseVersion" }} | ||
|
||
targets: | ||
updateVersion: | ||
name: Update the NodeJS version in provisioning environment | ||
sourceid: lastReleaseVersion | ||
kind: yaml | ||
spec: | ||
file: provisioning/tools-versions.yml | ||
key: nodejs_version | ||
scmid: default | ||
|
||
actions: | ||
default: | ||
kind: github/pullrequest | ||
title: Bump NodeJS version to {{ source "lastReleaseVersion" }} | ||
scmid: default | ||
spec: | ||
labels: | ||
- enhancement | ||
- nodejs |