Skip to content

Conversation

@mjohanse-emr
Copy link
Collaborator

@mjohanse-emr mjohanse-emr commented Jun 27, 2025

What does this Pull Request accomplish?

Changes the default expected-version value so that release events use github.event.release.tag_name instead of github.ref_name. All non-release events will continue to use ref_name.

Why should this Pull Request be merged?

AB#3176680

What testing has been done?

I created a fork of nitypes-python and tried publishing to testpypi using my updated action.
https://github.com/mjohanse-emr/nitypes-python/actions/runs/15974070397
The job failed, but build step that contains check-project-version succeeded. The job failure appears to be because I don't have publish permissions on this repo.

PR checks for this repo succeeded.

Signed-off-by: Michael Johansen <michael.johansen@ni.com>
@mjohanse-emr
Copy link
Collaborator Author

@mshafer-NI @bkeryan

Is there a way to test this change before submission by publishing a package to test PyPi? Maybe I can change the SHA on the check-project-version call to point to the commit in my dev branch?

@bkeryan
Copy link
Collaborator

bkeryan commented Jun 27, 2025

@mshafer-NI @bkeryan

Is there a way to test this change before submission by publishing a package to test PyPi? Maybe I can change the SHA on the check-project-version call to point to the commit in my dev branch?

Yes. Here's how:

  • Make a personal fork of nitypes-python
  • Do this: bkeryan/nitypes-python@532d25e
  • Change the SHA to point to your ni/python-actions dev branch
  • Create a release in your personal fork

@mjohanse-emr
Copy link
Collaborator Author

@bkeryan @mshafer-NI

I created a fork of nitypes-python and tried publishing to testpypi using my updated action.
https://github.com/mjohanse-emr/nitypes-python/actions/runs/15974070397
The job failed, but build step that contains check-project-version succeeded. The job failure appears to be because I don't have publish permissions on this repo.

I'm not sure it's actually necessary to complete the entire publish process since the step that I was trying to fix succeeded, but I'll leave that up to y'all.

@mjohanse-emr mjohanse-emr marked this pull request as ready for review June 30, 2025 14:20
@bkeryan
Copy link
Collaborator

bkeryan commented Jun 30, 2025

@bkeryan @mshafer-NI

I created a fork of nitypes-python and tried publishing to testpypi using my updated action. https://github.com/mjohanse-emr/nitypes-python/actions/runs/15974070397 The job failed, but build step that contains check-project-version succeeded. The job failure appears to be because I don't have publish permissions on this repo.

Your user account has publish permissions: https://test.pypi.org/project/nitypes/

However, your fork of the Git repo does not. You can login to TestPyPI and add your fork of the repo as a second trusted publisher if you want.

I'm not sure it's actually necessary to complete the entire publish process since the step that I was trying to fix succeeded, but I'll leave that up to y'all.

That's correct. The testing you did is sufficient to confirm that the updated check-project-version works from a release event.

@bkeryan bkeryan merged commit 5286c12 into main Jun 30, 2025
61 checks passed
@bkeryan bkeryan deleted the users/mjohanse/fix_check_project_version branch June 30, 2025 15:06
@bkeryan bkeryan linked an issue Jul 15, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

check-project-version does not reliably set expected-version

3 participants