diff --git a/.github/workflows/version-and-publish.yml b/.github/workflows/version-and-publish.yml index 8462ef0..1a829b4 100644 --- a/.github/workflows/version-and-publish.yml +++ b/.github/workflows/version-and-publish.yml @@ -1,7 +1,6 @@ name: Validate and Publish on: - workflow_dispatch: pull_request: types: [closed] branches: @@ -13,7 +12,7 @@ permissions: jobs: build: - if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/v')) + if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/v') runs-on: ubuntu-latest outputs: version: ${{ steps.extract-version.outputs.version }} @@ -25,13 +24,8 @@ jobs: - name: Extract and validate version id: extract-version run: | - if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - VERSION="v$(jq -r '.gemVersion' turnkey_client_inputs/config.json)" - echo "Read version from config.json: $VERSION" - else - VERSION="${GITHUB_HEAD_REF#release/}" - echo "Extracted version from branch: $VERSION" - fi + VERSION="${GITHUB_HEAD_REF#release/}" + echo "Extracted version from branch: $VERSION" if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then echo "::error::Version does not match expected format vX.X.X (got: $VERSION)" exit 1