Skip to content

Commit c95963e

Browse files
committed
feature: add node-version action input
1 parent 6edfad4 commit c95963e

File tree

2 files changed

+22
-11
lines changed

2 files changed

+22
-11
lines changed

GitVersion.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
workflow: GitHubFlow/v1
22
mode: ContinuousDeployment
33
version-in-branch-pattern: '^(?<Major>0|[1-9]\d*)$'
4+
minor-version-bump-message: '^(semver:\s*feature|semver:\s*minor|feature:|feat:)'
45
branches:
56
"v[0-9]+":
67
regex: ^v

action.yml

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,14 @@ inputs:
2929
description: "NPM run command"
3030
required: false
3131
default: "build"
32-
npm-version:
33-
description: "NPM version"
32+
node-version:
33+
description: "Node version"
3434
required: false
3535
default: "20.x"
36+
npm-version:
37+
description: "Obsolete - Please use node-version. This will be removed in future versions."
38+
required: false
39+
default: ""
3640
dotnet-version:
3741
description: ".NET version"
3842
required: false
@@ -55,7 +59,7 @@ inputs:
5559
runs:
5660
using: "composite"
5761
steps:
58-
- uses: actions/checkout@v4
62+
- uses: actions/checkout@v5
5963
with:
6064
fetch-depth: 0
6165
- name: Set env
@@ -66,13 +70,19 @@ runs:
6670
echo "NPM_WORKING_DIR=${{ inputs.npm-working-dir }}" >> $GITHUB_ENV
6771
echo "NPM_ENABLED=${{ inputs.npm-enabled }}" >> $GITHUB_ENV
6872
echo "NPM_RUN_COMMAND=${{ inputs.npm-run-command }}" >> $GITHUB_ENV
69-
echo "NPM_VERSION=${{ inputs.npm-version }}" >> $GITHUB_ENV
7073
echo "DOTNET_VERSION=${{ inputs.dotnet-version }}" >> $GITHUB_ENV
7174
echo "BUILD_OUTPUT=${{ inputs.build-output }}" >> $GITHUB_ENV
7275
echo "ARTIFACT_OUTPUT=${{ inputs.artifact-output }}" >> $GITHUB_ENV
7376
echo "DOTNET_PACK=${{ inputs.dotnet-pack }}" >> $GITHUB_ENV
7477
echo "UMBRACO_VERSION=${{ inputs.umbraco-version }}" >> $GITHUB_ENV
7578
79+
if [ -z "${{ inputs.npm-version }}" ]; then
80+
echo "NODE_VERSION=${{ inputs.node-version }}" >> $GITHUB_ENV
81+
else
82+
echo "Warning: 'npm-version' input is obsolete. Please use 'node-version' instead. This will be removed in future versions." >&2
83+
echo "NODE_VERSION=${{ inputs.npm-version }}" >> $GITHUB_ENV
84+
fi
85+
7686
has_gitversion_config=$(test -f "GitVersion.yml" && echo true || echo false)
7787
7888
ls -la
@@ -81,14 +91,14 @@ runs:
8191
- name: Download GitVersion.yml
8292
shell: bash
8393
if: ${{ env.HAS_GITVERSION_CONFIG == 'false' }}
84-
run: curl -sSL https://raw.githubusercontent.com/jcdcdev/jcdcdev.Umbraco.GitHub.Build/main/GitVersion.yml -o GitVersion.yml
94+
run: curl -sSL https://raw.githubusercontent.com/jcdcdev/jcdcdev.Umbraco.GitHub.Build/v0/config/GitVersion.yml -o GitVersion.yml
8595
- name: Install GitVersion
86-
uses: gittools/actions/gitversion/setup@v1.1.1
96+
uses: gittools/actions/gitversion/setup@v3
8797
with:
8898
versionSpec: "5.x"
8999
- name: Determine Version
90100
id: gitversion
91-
uses: gittools/actions/gitversion/execute@v1.1.1
101+
uses: gittools/actions/gitversion/execute@v3
92102
with:
93103
useConfigFile: true
94104
configFilePath: "GitVersion.yml"
@@ -107,10 +117,10 @@ runs:
107117
108118
echo "package-version=$version" >> $GITHUB_OUTPUT
109119
echo "artifact-name=${ARTIFACT_NAME}" >> $GITHUB_OUTPUT
110-
- uses: actions/setup-node@v3
120+
- uses: actions/setup-node@v6
111121
if: ${{ env.NPM_ENABLED == 'true' }}
112122
with:
113-
node-version: ${{ env.NPM_VERSION }}
123+
node-version: ${{ env.NODE_VERSION }}
114124
- if: ${{ env.NPM_ENABLED == 'true' }}
115125
shell: bash
116126
run: |
@@ -119,7 +129,7 @@ runs:
119129
npm run ${{ env.NPM_RUN_COMMAND }}
120130
popd
121131
- name: Setup .NET
122-
uses: actions/setup-dotnet@v4
132+
uses: actions/setup-dotnet@v5
123133
with:
124134
dotnet-version: ${{ env.DOTNET_VERSION }}
125135
- name: Build project
@@ -130,7 +140,7 @@ runs:
130140
if: ${{ env.DOTNET_PACK == 'true' }}
131141
run: dotnet pack ${{ env.PROJECT_PATH }} --configuration Release -p:Version=${{ env.PACKAGE_VERSION }} --output ${{ env.ARTIFACT_OUTPUT }} -p:UmbracoVersion=${{ env.UMBRACO_VERSION }}
132142
- name: Upload artifact
133-
uses: actions/upload-artifact@v4
143+
uses: actions/upload-artifact@v5
134144
with:
135145
name: ${{ env.ARTIFACT_NAME }}
136146
path: "${{ env.ARTIFACT_OUTPUT }}/**/*.nupkg"

0 commit comments

Comments
 (0)