Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve GitHub release workflow #11754

Merged
merged 2 commits into from
Jan 3, 2024
Merged

Conversation

nicoddemus
Copy link
Member

This changes the existing script to just generate the release notes and delegate the actual publishing to the softprops/action-gh-release@v1 action.

This allows us to delete the custom code, which failed recently in https://github.com/pytest-dev/pytest/actions/runs/7370258570/job/20056477756.

In addition, the 2nd commit enables type checking in scripts/ for additional safety.

I will remove the secrets that are no longer needed from the repository after this is merged.

@nicoddemus nicoddemus force-pushed the release-notes branch 2 times, most recently from f4718f4 to 23b6a90 Compare December 31, 2023 13:38
Copy link
Member

@bluetech bluetech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just one question

uses: softprops/action-gh-release@v1
with:
body_path: scripts/latest-release-notes.md
files: dist/*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this line do (what is in dist/)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sdist and wheel generated by the hynek/build-and-inspect-python-package@v1.5.4 action.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason to have these artifacts in github? My instincts tell me it's better to have one source of truth (PyPI).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is standard practice, many other plugins follow the same approach.

Note we are publishing exactly the same files that we upload to PyPI, I particularly like it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am still somewhat interested to know why someone would want to download the wheel/sdist from github instead of pypi, but OK :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Distro packagers do strange things

Copy link
Member Author

@nicoddemus nicoddemus Jan 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it neat to have the sdist/wheel in the GitHub release page -- given it is the exact same package as PyPI I don't see problems with it. 😁

@nicoddemus nicoddemus added the needs backport applied to PRs, indicates that it should be ported to the current bug-fix branch label Jan 2, 2024
This changes the existing script to just generate the release notes and delegate the actual publishing to the `softprops/action-gh-release@v1` action.

This allows us to delete the custom code, which failed recently in https://github.com/pytest-dev/pytest/actions/runs/7370258570/job/20056477756.
@nicoddemus nicoddemus merged commit cd07177 into pytest-dev:main Jan 3, 2024
24 checks passed
@nicoddemus nicoddemus deleted the release-notes branch January 3, 2024 23:14
@nicoddemus nicoddemus added backport 8.0.x and removed needs backport applied to PRs, indicates that it should be ported to the current bug-fix branch labels Jan 3, 2024
nicoddemus added a commit to nicoddemus/pytest that referenced this pull request Jan 4, 2024
nicoddemus added a commit to nicoddemus/pytest that referenced this pull request Jan 4, 2024
nicoddemus added a commit that referenced this pull request Jan 4, 2024
nicoddemus added a commit to nicoddemus/pytest that referenced this pull request Jan 17, 2024
Follow up to pytest-dev#11754, noticed that the latest GitHub release does not contain the attached files.

Output log from the action:

```
🤔 Pattern 'dist/*' does not match any files.
```
nicoddemus added a commit that referenced this pull request Jan 17, 2024
Follow up to #11754, noticed that the latest GitHub release does not contain the attached files.

Output log from the action:

```
🤔 Pattern 'dist/*' does not match any files.
```
nicoddemus added a commit to nicoddemus/pytest that referenced this pull request Jan 17, 2024
Follow up to pytest-dev#11754, noticed that the latest GitHub release does not contain the attached files.

Output log from the action:

```
🤔 Pattern 'dist/*' does not match any files.
```
nicoddemus added a commit that referenced this pull request Jan 17, 2024
Follow up to #11754, noticed that the latest GitHub release does not contain the attached files.

Output log from the action:

```
🤔 Pattern 'dist/*' does not match any files.
```
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.

3 participants