diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index d380095..614c40b 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -28,12 +28,24 @@ jobs: steps: - uses: actions/checkout@v4 with: + ref: staging fetch-depth: 0 + - name: Extract bump type from PR title + id: bump + run: | + BUMP_TYPE=$(jq -r .pull_request.title "$GITHUB_EVENT_PATH" | grep -Eo "#(patch|minor|major)" | head -n1 || echo "#patch") + echo "bump_type=${BUMP_TYPE/#/}" >> $GITHUB_OUTPUT + - name: Bump version and push tag uses: anothrNick/github-tag-action@1.64.0 env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + DEFAULT_BUMP: ${{ steps.bump.outputs.bump_type }} + RELEASE_BRANCHES: staging + PATCH_STRING_TOKEN: "#patch" + MINOR_STRING_TOKEN: "#minor" + MAJOR_STRING_TOKEN: "#major" WITH_V: false - name: Set up Git diff --git a/tests/test_integrations_github.py b/tests/test_integrations_github.py index dc2ab22..fb4c091 100644 --- a/tests/test_integrations_github.py +++ b/tests/test_integrations_github.py @@ -2,7 +2,6 @@ # Since responses are all mocked and no data validation is done by the CLI -- # we let the API handle validation -- we don't need valid input files. - def _dummy_file(tmp_path): f = tmp_path / "test_integrations_github_add.json" f.write_text("foobar")