Skip to content

Commit 26dd4bc

Browse files
Merge pull request #10 from NHSDigital/fb/version-bump
Fix version detection in publish workflow
2 parents d0ae10f + 1e78b17 commit 26dd4bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/cicd-2-publish.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ jobs:
3333
echo "nodejs_version=$(grep "^nodejs\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
3434
echo "python_version=$(grep "^python\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
3535
echo "terraform_version=$(grep "^terraform\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
36-
# TODO: Get the version, but it may not be the .version file as this should come from the CI/CD Pull Request Workflow
37-
echo "version=$(head -n 1 .version 2> /dev/null || echo unknown)" >> $GITHUB_OUTPUT
36+
# Read version from package.json for npm projects
37+
echo "version=v$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
3838
- name: "List variables"
3939
run: |
4040
export BUILD_DATETIME="${{ steps.variables.outputs.build_datetime }}"

0 commit comments

Comments
 (0)