From bf202575d9d7364bb7eeab6c95f71a34a00099b0 Mon Sep 17 00:00:00 2001 From: Jacob Smits Date: Fri, 20 Feb 2026 11:45:07 -0600 Subject: [PATCH 01/10] Add GitHub Actions workflow for private composer releases --- .../_private_composer_gh_auto_release.yaml | 227 ++++++++++++++++++ 1 file changed, 227 insertions(+) create mode 100644 .github/workflows/.github/workflows/_private_composer_gh_auto_release.yaml diff --git a/.github/workflows/.github/workflows/_private_composer_gh_auto_release.yaml b/.github/workflows/.github/workflows/_private_composer_gh_auto_release.yaml new file mode 100644 index 0000000..4890006 --- /dev/null +++ b/.github/workflows/.github/workflows/_private_composer_gh_auto_release.yaml @@ -0,0 +1,227 @@ +name: private_composer_auto_release + +on: + workflow_call: + inputs: + php_version: + required: false + default: '8.3' + type: string + private_package_repo_workflow_id: + required: false + default: 235090394 + type: string + private_package_repo: + required: false + default: 'SparkHire/php-private-composer-registry' + type: string + +jobs: + run: + runs-on: ubuntu-latest + + steps: + - name: Generate a token + id: generate-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ secrets.GH_APP_ID }} + private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} + owner: ${{ github.repository_owner }} + permission-issues: write + + - name: Get info + id: get-commit-hash + run: | + COMMIT_INPUT="${{ inputs.commit_hash }}" + GITHUB_SHA="${{ github.sha }}" + + echo "Workspace dir: ${{ github.workspace }}" + echo "User: $(id -u -n) $(id -u):$(id -g)" + + if [[ -z "$COMMIT_INPUT" ]]; then + HASH=$(echo "$GITHUB_SHA" | cut -c 1-7) + echo "Commit input is empty. Using current SHA: $HASH" + else + HASH=$(echo "$COMMIT_INPUT" | cut -c 1-7) + echo "Commit input provided. Using: $HASH" + fi + + echo "commit_hash=$HASH" >> "$GITHUB_OUTPUT" + + - name: Checkout repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ steps.generate-token.outputs.token }} + + - name: Set Git user + run: | + git config user.name "SparkHireBot" + git config user.email "dev@sparkhire.com" + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ inputs.php_version }} + coverage: none + + - name: Composer cache + id: cache-composer + uses: actions/cache@v4 + with: + path: ~/.cache/composer + key: ${{ runner.os }}-build-cache-composer-modules-${{ hashFiles('**/composer.lock') }} + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-scripts + + - name: Get latest release version + id: release-version + env: + GH_TOKEN: ${{ steps.generate-token.outputs.token }} + run: | + VERSION=$(gh release list --limit 1 --json tagName --jq '.[0].tagName') + # Remove 'v' prefix if it exists + VERSION=${VERSION#v} + echo "Latest release: $VERSION" + echo "package_version=$VERSION" >> $GITHUB_OUTPUT + + - name: Get branch name + id: get-branch-name + run: | + if [[ "${{ github.event_name }}" == "pull_request" ]]; then + echo "Getting branch name from pull request head ref" + branch_name="${{ github.event.pull_request.head.ref }}" + elif [[ "${{ github.event_name }}" == "push" ]]; then + echo "Getting branch name from merged commit message" + # Get only the first line (title) of the merge commit to avoid matching "from" in body text + merge_commit_title=$(git log --format=%s -n 1 "${GITHUB_SHA}") + echo "Merge commit title: $merge_commit_title" + # Match specifically the GitHub merge commit format: "Merge pull request #XX from owner/branch" + if [[ "$merge_commit_title" =~ ^Merge\ pull\ request\ \#[0-9]+\ from\ (.+)$ ]]; then + full_branch="${BASH_REMATCH[1]}" + # Remove owner prefix (e.g., "SparkHire/dependabot/..." -> "dependabot/...") + branch_name=$(echo "$full_branch" | cut -d/ -f2-) + else + echo "Warning: Commit is not a merge commit, skipping branch name extraction" + branch_name="" + fi + fi + + branch_name=major/test + + echo "Branch name: ${branch_name}" + branch_name_sanitized="${branch_name//\//-}" + echo "branch_name=${branch_name}" >> $GITHUB_OUTPUT + echo "branch_name_sanitized=${branch_name_sanitized}" >> $GITHUB_OUTPUT + + - name: Fail if branch_name not set + if: ${{ steps.get-branch-name.outputs.branch_name == '' }} + run: | + echo "Branch name was not set" >&2 + exit 1 + + - name: Determine version bump + id: determine-version-bump + run: | + echo "Current version: ${{ steps.release-version.outputs.package_version }}" + echo "Branch name: ${{ steps.get-branch-name.outputs.branch_name }}" + + BRANCH_NAME="${{ steps.get-branch-name.outputs.branch_name }}" + CURRENT_VERSION="${{ steps.release-version.outputs.package_version }}" + + if [[ "$BRANCH_NAME" == *"release/"* ]]; then + echo "This is a release branch. Setting version bump to 'major'." + VERSION_BUMP="major" + elif [[ "$BRANCH_NAME" == *"major/"* ]]; then + echo "This is a major branch. Setting version bump to 'major'." + VERSION_BUMP="major" + elif [[ "$BRANCH_NAME" == *"minor/"* ]]; then + echo "This is a minor branch. Setting version bump to 'minor'." + VERSION_BUMP="minor" + elif [[ "$BRANCH_NAME" == *"patch/"* ]]; then + echo "This is a patch branch. Setting version bump to 'patch'." + VERSION_BUMP="patch" + elif [[ "$BRANCH_NAME" == *"hotfix/"* ]]; then + echo "This is a hotfix branch. Setting version bump to 'patch'." + VERSION_BUMP="patch" + elif [[ "$BRANCH_NAME" == *"feature/"* ]]; then + echo "This is a feature branch. Setting version bump to 'minor'." + VERSION_BUMP="minor" + elif [[ "$BRANCH_NAME" == *"bugfix/"* ]]; then + echo "This is a bugfix branch. Setting version bump to 'patch'." + VERSION_BUMP="patch" + elif [[ "$BRANCH_NAME" == *"chore/"* ]]; then + echo "This is a chore branch. Setting version bump to 'patch'." + VERSION_BUMP="patch" + elif [[ "$BRANCH_NAME" == *"docs/"* ]]; then + echo "This is a docs branch. Setting version bump to 'patch'." + VERSION_BUMP="patch" + elif [[ "$BRANCH_NAME" == *"test/"* ]]; then + echo "This is a test branch. Setting version bump to 'patch'." + VERSION_BUMP="patch" + elif [[ "$BRANCH_NAME" == *"dependabot/"* ]]; then + echo "This is a dependabot branch. Setting version bump to 'patch'." + VERSION_BUMP="patch" + else + echo "Branch name does not match any known patterns!" + exit 1 + fi + + echo "Determined version bump: $VERSION_BUMP" + + echo "version_bump=$VERSION_BUMP" >> $GITHUB_OUTPUT + + - name: Create release + env: + GH_TOKEN: ${{ steps.generate-token.outputs.token }} + run: | + VERSION_BUMP="${{ steps.determine-version-bump.outputs.version_bump }}" + CURRENT_VERSION="${{ steps.release-version.outputs.package_version }}" + + if [[ -z "$CURRENT_VERSION" ]]; then + echo "No current version found. Defaulting to 0.0.0" + CURRENT_VERSION="0.0.0" + fi + + IFS='.' read -r -a VERSION_PARTS <<< "$CURRENT_VERSION" + + MAJOR="${VERSION_PARTS[0]}" + MINOR="${VERSION_PARTS[1]}" + PATCH="${VERSION_PARTS[2]}" + + # Handle missing parts if version is like "1.0" + MINOR=${MINOR:-0} + PATCH=${PATCH:-0} + + if [[ "$VERSION_BUMP" == "major" ]]; then + MAJOR=$((MAJOR + 1)) + MINOR=0 + PATCH=0 + elif [[ "$VERSION_BUMP" == "minor" ]]; then + MINOR=$((MINOR + 1)) + PATCH=0 + elif [[ "$VERSION_BUMP" == "patch" ]]; then + PATCH=$((PATCH + 1)) + else + echo "Unknown version bump type: $VERSION_BUMP" + exit 1 + fi + + NEW_VERSION="$MAJOR.$MINOR.$PATCH" + echo "Bumping version from $CURRENT_VERSION to $NEW_VERSION" + + # Create tag and release + # git tag "v$NEW_VERSION" + # git push origin "v$NEW_VERSION" + + # gh release create "v$NEW_VERSION" --generate-notes + + - name: Update private package repository + env: + GH_TOKEN: ${{ steps.generate-token.outputs.token }} + WORKFLOW_ID: ${{ inputs.private_package_repo_workflow_id }} + REPO: ${{ inputs.private_package_repo }} + run: | + gh workflow run "$WORKFLOW_ID" --repo "$REPO" --ref main From b8f7f1b1d9f076485ceb18ab52a116713ce1f447 Mon Sep 17 00:00:00 2001 From: Jacob Smits Date: Fri, 20 Feb 2026 11:47:37 -0600 Subject: [PATCH 02/10] Removed test/dev code --- .../workflows/_private_composer_gh_auto_release.yaml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/.github/workflows/_private_composer_gh_auto_release.yaml b/.github/workflows/.github/workflows/_private_composer_gh_auto_release.yaml index 4890006..a0178e4 100644 --- a/.github/workflows/.github/workflows/_private_composer_gh_auto_release.yaml +++ b/.github/workflows/.github/workflows/_private_composer_gh_auto_release.yaml @@ -109,8 +109,6 @@ jobs: fi fi - branch_name=major/test - echo "Branch name: ${branch_name}" branch_name_sanitized="${branch_name//\//-}" echo "branch_name=${branch_name}" >> $GITHUB_OUTPUT @@ -213,10 +211,10 @@ jobs: echo "Bumping version from $CURRENT_VERSION to $NEW_VERSION" # Create tag and release - # git tag "v$NEW_VERSION" - # git push origin "v$NEW_VERSION" + git tag "v$NEW_VERSION" + git push origin "v$NEW_VERSION" - # gh release create "v$NEW_VERSION" --generate-notes + gh release create "v$NEW_VERSION" --generate-notes - name: Update private package repository env: From 2fc22352529a8969182e1b9ddd0efc6e3b57fa22 Mon Sep 17 00:00:00 2001 From: Jacob Smits Date: Fri, 20 Feb 2026 12:09:02 -0600 Subject: [PATCH 03/10] Moved file --- .../workflows => }/_private_composer_gh_auto_release.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{.github/workflows => }/_private_composer_gh_auto_release.yaml (100%) diff --git a/.github/workflows/.github/workflows/_private_composer_gh_auto_release.yaml b/.github/workflows/_private_composer_gh_auto_release.yaml similarity index 100% rename from .github/workflows/.github/workflows/_private_composer_gh_auto_release.yaml rename to .github/workflows/_private_composer_gh_auto_release.yaml From bb375f7cd273fea41f8def59f302e8d444e5dcba Mon Sep 17 00:00:00 2001 From: Jacob Smits Date: Fri, 20 Feb 2026 12:17:03 -0600 Subject: [PATCH 04/10] Added ref input param --- .github/workflows/_private_composer_gh_auto_release.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/_private_composer_gh_auto_release.yaml b/.github/workflows/_private_composer_gh_auto_release.yaml index a0178e4..2d694bb 100644 --- a/.github/workflows/_private_composer_gh_auto_release.yaml +++ b/.github/workflows/_private_composer_gh_auto_release.yaml @@ -9,12 +9,15 @@ on: type: string private_package_repo_workflow_id: required: false - default: 235090394 + default: "235090394" type: string private_package_repo: required: false default: 'SparkHire/php-private-composer-registry' type: string + private_package_ref: + required: false + default: "main" jobs: run: @@ -221,5 +224,6 @@ jobs: GH_TOKEN: ${{ steps.generate-token.outputs.token }} WORKFLOW_ID: ${{ inputs.private_package_repo_workflow_id }} REPO: ${{ inputs.private_package_repo }} + REF: ${{ inputs.private_package_ref }} run: | - gh workflow run "$WORKFLOW_ID" --repo "$REPO" --ref main + gh workflow run "$WORKFLOW_ID" --repo "$REPO" --ref $REF From 2539fe73c2722ee159b6c165746c87348ecca1f4 Mon Sep 17 00:00:00 2001 From: Jacob Smits Date: Fri, 20 Feb 2026 12:18:32 -0600 Subject: [PATCH 05/10] Removed unneeded permissions --- .github/workflows/_private_composer_gh_auto_release.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/_private_composer_gh_auto_release.yaml b/.github/workflows/_private_composer_gh_auto_release.yaml index 2d694bb..4de72d4 100644 --- a/.github/workflows/_private_composer_gh_auto_release.yaml +++ b/.github/workflows/_private_composer_gh_auto_release.yaml @@ -31,7 +31,6 @@ jobs: app-id: ${{ secrets.GH_APP_ID }} private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} owner: ${{ github.repository_owner }} - permission-issues: write - name: Get info id: get-commit-hash From 23bec6cc64f4a040336c803a7a5ce6a2882233ec Mon Sep 17 00:00:00 2001 From: Jacob Smits Date: Fri, 20 Feb 2026 12:21:03 -0600 Subject: [PATCH 06/10] Check if version tag already exists --- .github/workflows/_private_composer_gh_auto_release.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/_private_composer_gh_auto_release.yaml b/.github/workflows/_private_composer_gh_auto_release.yaml index 4de72d4..5bf6ac9 100644 --- a/.github/workflows/_private_composer_gh_auto_release.yaml +++ b/.github/workflows/_private_composer_gh_auto_release.yaml @@ -213,8 +213,12 @@ jobs: echo "Bumping version from $CURRENT_VERSION to $NEW_VERSION" # Create tag and release - git tag "v$NEW_VERSION" - git push origin "v$NEW_VERSION" + if git rev-parse "refs/tags/v$NEW_VERSION" >/dev/null 2>&1; then + echo "Tag v$NEW_VERSION already exists. Skipping tag creation and push." + else + git tag "v$NEW_VERSION" + git push origin "v$NEW_VERSION" + fi gh release create "v$NEW_VERSION" --generate-notes From ed0dd0c6ace4c730034462de7cf1b1848fca902e Mon Sep 17 00:00:00 2001 From: Jacob Smits Date: Fri, 20 Feb 2026 12:23:10 -0600 Subject: [PATCH 07/10] Update workflows to only look for branch names that start with the intended names --- .github/workflows/_npm_gh_auto_release.yaml | 22 +++++++++---------- .../_private_composer_gh_auto_release.yaml | 22 +++++++++---------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/_npm_gh_auto_release.yaml b/.github/workflows/_npm_gh_auto_release.yaml index 79ee94c..65dd088 100644 --- a/.github/workflows/_npm_gh_auto_release.yaml +++ b/.github/workflows/_npm_gh_auto_release.yaml @@ -145,37 +145,37 @@ jobs: BRANCH_NAME="${{ steps.get-branch-name.outputs.branch_name }}" CURRENT_VERSION="${{ steps.package-version.outputs.package_version }}" - if [[ "$BRANCH_NAME" == *"release/"* ]]; then + if [[ "$BRANCH_NAME" == "release/"* ]]; then echo "This is a release branch. Setting version bump to 'major'." VERSION_BUMP="major" - elif [[ "$BRANCH_NAME" == *"major/"* ]]; then + elif [[ "$BRANCH_NAME" == "major/"* ]]; then echo "This is a major branch. Setting version bump to 'major'." VERSION_BUMP="major" - elif [[ "$BRANCH_NAME" == *"minor/"* ]]; then + elif [[ "$BRANCH_NAME" == "minor/"* ]]; then echo "This is a minor branch. Setting version bump to 'minor'." VERSION_BUMP="minor" - elif [[ "$BRANCH_NAME" == *"patch/"* ]]; then + elif [[ "$BRANCH_NAME" == "patch/"* ]]; then echo "This is a patch branch. Setting version bump to 'patch'." VERSION_BUMP="patch" - elif [[ "$BRANCH_NAME" == *"hotfix/"* ]]; then + elif [[ "$BRANCH_NAME" == "hotfix/"* ]]; then echo "This is a hotfix branch. Setting version bump to 'patch'." VERSION_BUMP="patch" - elif [[ "$BRANCH_NAME" == *"feature/"* ]]; then + elif [[ "$BRANCH_NAME" == "feature/"* ]]; then echo "This is a feature branch. Setting version bump to 'minor'." VERSION_BUMP="minor" - elif [[ "$BRANCH_NAME" == *"bugfix/"* ]]; then + elif [[ "$BRANCH_NAME" == "bugfix/"* ]]; then echo "This is a bugfix branch. Setting version bump to 'patch'." VERSION_BUMP="patch" - elif [[ "$BRANCH_NAME" == *"chore/"* ]]; then + elif [[ "$BRANCH_NAME" == "chore/"* ]]; then echo "This is a chore branch. Setting version bump to 'patch'." VERSION_BUMP="patch" - elif [[ "$BRANCH_NAME" == *"docs/"* ]]; then + elif [[ "$BRANCH_NAME" == "docs/"* ]]; then echo "This is a docs branch. Setting version bump to 'patch'." VERSION_BUMP="patch" - elif [[ "$BRANCH_NAME" == *"test/"* ]]; then + elif [[ "$BRANCH_NAME" == "test/"* ]]; then echo "This is a test branch. Setting version bump to 'patch'." VERSION_BUMP="patch" - elif [[ "$BRANCH_NAME" == *"dependabot/"* ]]; then + elif [[ "$BRANCH_NAME" == "dependabot/"* ]]; then echo "This is a dependabot branch. Setting version bump to 'patch'." VERSION_BUMP="patch" else diff --git a/.github/workflows/_private_composer_gh_auto_release.yaml b/.github/workflows/_private_composer_gh_auto_release.yaml index 5bf6ac9..533a5b7 100644 --- a/.github/workflows/_private_composer_gh_auto_release.yaml +++ b/.github/workflows/_private_composer_gh_auto_release.yaml @@ -131,37 +131,37 @@ jobs: BRANCH_NAME="${{ steps.get-branch-name.outputs.branch_name }}" CURRENT_VERSION="${{ steps.release-version.outputs.package_version }}" - if [[ "$BRANCH_NAME" == *"release/"* ]]; then + if [[ "$BRANCH_NAME" == "release/"* ]]; then echo "This is a release branch. Setting version bump to 'major'." VERSION_BUMP="major" - elif [[ "$BRANCH_NAME" == *"major/"* ]]; then + elif [[ "$BRANCH_NAME" == "major/"* ]]; then echo "This is a major branch. Setting version bump to 'major'." VERSION_BUMP="major" - elif [[ "$BRANCH_NAME" == *"minor/"* ]]; then + elif [[ "$BRANCH_NAME" == "minor/"* ]]; then echo "This is a minor branch. Setting version bump to 'minor'." VERSION_BUMP="minor" - elif [[ "$BRANCH_NAME" == *"patch/"* ]]; then + elif [[ "$BRANCH_NAME" == "patch/"* ]]; then echo "This is a patch branch. Setting version bump to 'patch'." VERSION_BUMP="patch" - elif [[ "$BRANCH_NAME" == *"hotfix/"* ]]; then + elif [[ "$BRANCH_NAME" == "hotfix/"* ]]; then echo "This is a hotfix branch. Setting version bump to 'patch'." VERSION_BUMP="patch" - elif [[ "$BRANCH_NAME" == *"feature/"* ]]; then + elif [[ "$BRANCH_NAME" == "feature/"* ]]; then echo "This is a feature branch. Setting version bump to 'minor'." VERSION_BUMP="minor" - elif [[ "$BRANCH_NAME" == *"bugfix/"* ]]; then + elif [[ "$BRANCH_NAME" == "bugfix/"* ]]; then echo "This is a bugfix branch. Setting version bump to 'patch'." VERSION_BUMP="patch" - elif [[ "$BRANCH_NAME" == *"chore/"* ]]; then + elif [[ "$BRANCH_NAME" == "chore/"* ]]; then echo "This is a chore branch. Setting version bump to 'patch'." VERSION_BUMP="patch" - elif [[ "$BRANCH_NAME" == *"docs/"* ]]; then + elif [[ "$BRANCH_NAME" == "docs/"* ]]; then echo "This is a docs branch. Setting version bump to 'patch'." VERSION_BUMP="patch" - elif [[ "$BRANCH_NAME" == *"test/"* ]]; then + elif [[ "$BRANCH_NAME" == "test/"* ]]; then echo "This is a test branch. Setting version bump to 'patch'." VERSION_BUMP="patch" - elif [[ "$BRANCH_NAME" == *"dependabot/"* ]]; then + elif [[ "$BRANCH_NAME" == "dependabot/"* ]]; then echo "This is a dependabot branch. Setting version bump to 'patch'." VERSION_BUMP="patch" else From 04de4128f555a08374e823d290831583a54e2c47 Mon Sep 17 00:00:00 2001 From: Jacob Smits Date: Fri, 20 Feb 2026 12:25:20 -0600 Subject: [PATCH 08/10] Add commit_hash input --- .github/workflows/_npm_gh_auto_release.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/_npm_gh_auto_release.yaml b/.github/workflows/_npm_gh_auto_release.yaml index 65dd088..e773862 100644 --- a/.github/workflows/_npm_gh_auto_release.yaml +++ b/.github/workflows/_npm_gh_auto_release.yaml @@ -16,6 +16,9 @@ on: required: false type: boolean default: false + commit_hash: + required: false + type: string jobs: run: From 72e0f31572a7eda7b54b6f6e5b2074df8a23b24b Mon Sep 17 00:00:00 2001 From: Jacob Smits Date: Fri, 20 Feb 2026 12:26:28 -0600 Subject: [PATCH 09/10] Remove unneeded workflow steps --- .../_private_composer_gh_auto_release.yaml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.github/workflows/_private_composer_gh_auto_release.yaml b/.github/workflows/_private_composer_gh_auto_release.yaml index 533a5b7..9aede96 100644 --- a/.github/workflows/_private_composer_gh_auto_release.yaml +++ b/.github/workflows/_private_composer_gh_auto_release.yaml @@ -62,22 +62,6 @@ jobs: git config user.name "SparkHireBot" git config user.email "dev@sparkhire.com" - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ inputs.php_version }} - coverage: none - - - name: Composer cache - id: cache-composer - uses: actions/cache@v4 - with: - path: ~/.cache/composer - key: ${{ runner.os }}-build-cache-composer-modules-${{ hashFiles('**/composer.lock') }} - - - name: Install dependencies - run: composer install --prefer-dist --no-progress --no-scripts - - name: Get latest release version id: release-version env: From d5dc49b34c9a0262dda7f57d1be57aa3aef52b75 Mon Sep 17 00:00:00 2001 From: Jacob Smits Date: Fri, 20 Feb 2026 12:27:51 -0600 Subject: [PATCH 10/10] Add check if release already exists --- .github/workflows/_private_composer_gh_auto_release.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/_private_composer_gh_auto_release.yaml b/.github/workflows/_private_composer_gh_auto_release.yaml index 9aede96..01d6f3a 100644 --- a/.github/workflows/_private_composer_gh_auto_release.yaml +++ b/.github/workflows/_private_composer_gh_auto_release.yaml @@ -204,7 +204,11 @@ jobs: git push origin "v$NEW_VERSION" fi - gh release create "v$NEW_VERSION" --generate-notes + if gh release view "v$NEW_VERSION" > /dev/null 2>&1; then + echo "Release v$NEW_VERSION already exists. Skipping creation." + else + gh release create "v$NEW_VERSION" --generate-notes + fi - name: Update private package repository env: