From 7d6ee1bf2ea3c621dc3276f988ef367b7a1b6392 Mon Sep 17 00:00:00 2001 From: Marco Maatz Date: Sat, 19 Oct 2024 01:00:26 +0200 Subject: [PATCH] set version error fix --- .gitea/workflows/setPackageVersion.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitea/workflows/setPackageVersion.yaml b/.gitea/workflows/setPackageVersion.yaml index bb6ce43..73ef13b 100644 --- a/.gitea/workflows/setPackageVersion.yaml +++ b/.gitea/workflows/setPackageVersion.yaml @@ -16,10 +16,17 @@ jobs: uses: actions/checkout@v4 - name: Set run: | + git pull origin HEAD:${{ inputs.branch }} + echo "Setting Version to ${{ inputs.version }}" npm version --no-git-tag-version ${{ inputs.version }} - name: Commit version change run: | + if git diff --quiet && git diff --cached --quiet; then + echo "No changes in the repository." + exit 0 + fi + git config user.name "${{ vars.GIT_DEPLOY_NAME }}" git config user.email "${{ vars.GIT_DEPLOY_MAIL }}" git add package.json