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