From 0d48f86180677da6dad5e34fc993351034750cf2 Mon Sep 17 00:00:00 2001 From: Marco Maatz Date: Wed, 23 Oct 2024 09:48:52 +0200 Subject: [PATCH] add package path --- .gitea/workflows/setPackageVersion.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitea/workflows/setPackageVersion.yaml b/.gitea/workflows/setPackageVersion.yaml index 73ef13b..a9d70be 100644 --- a/.gitea/workflows/setPackageVersion.yaml +++ b/.gitea/workflows/setPackageVersion.yaml @@ -8,6 +8,9 @@ on: branch: required: true type: string + packagePath: + required: false + type: string jobs: SetVersion: runs-on: ubuntu-latest @@ -19,7 +22,14 @@ jobs: git pull origin HEAD:${{ inputs.branch }} echo "Setting Version to ${{ inputs.version }}" + + git_path=pwd + if [ "${{ inputs.packagePath }}" != "null" ]; then + cd ${{ inputs.packagePath }} + fi + npm version --no-git-tag-version ${{ inputs.version }} + cd $git_path - name: Commit version change run: | if git diff --quiet && git diff --cached --quiet; then