Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
V0.0.1 packaging #30
V0.0.1 packaging #30
Changes from 74 commits
559ab5a
d7633f8
e8628cf
014a25d
bddbd4e
005edc8
4625c56
332723d
013ffb3
d81ef2c
5b40496
c073764
74b5d85
b17e0b1
c27597f
419d545
14b5c22
f7d4d54
83c2eef
41fd76d
671544d
2cf38b4
9939ed4
3241ef6
e27c927
7721f3d
97f3dc6
050ba6a
e952025
ca61d8d
d9eddb9
41f58f1
db6ae4e
d6883ad
4234261
6a05984
1ffa682
5afe9cf
6be71e2
8bd8bc3
25350aa
5429bad
d2855d1
39db00c
ed7e4ec
c139ca3
c812503
bf86554
0424c61
27c1692
8c2e56f
c2ea22f
7a3e855
9b9ee3a
67d76a5
e444346
aadb104
baa72ab
b317492
e2b1955
a18b56a
cef8c8d
6b44056
b00bae7
3fe355e
9208fa7
0880102
241595c
5a649d0
feae49f
994f9b0
22f95f3
a08a9dd
a241b36
9c8b787
2b53ac3
8293be9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need to access GitHub Actions secrets to work, because
poetry publish
has to authenticate with PyPI. However that is done, this code will probably have to be expanded slightly to facilitate it. In particular, if environment variables are used, the relevant secrets will have to be placed in them using anenv:
key. I don't know if this needs to be taken care of before the PR is merged or not. In particular, if this CI job is only going to be used in the future, and not for initially publishing the package, then there is no need to make any further changes to this file before merging the PR.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah so this is a new one for me. Usually I set a pypi api token as an env var. However, when I logged into pypi I saw a new feature for "trusted publishers". I set up this repo as a trusted publisher which I think means this github action will be able to publish this package without storing an api token.
Let's merge with this as is, and if it doesn't work we know how to quickly fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good! Based on Using trusted publishing with GitHub Actions, I think using trusted publishing in
publish-package.yml
may require either doing the publish step with thepypi-publish
action instead of by runningpoetry publish
, or taking explicit steps to providepoetry
with the OIDC-based token. (However publishing is achieved, the build could definitely still be done withpoetry build
.) Either way, as you say, it can be fixed pretty quickly if it doesn't work.It occurs to me that fixing it may be even easier if
workflow_dispatch
is added as a second event trigger. Then, if a release is created on GitHub and publishing fails in a way requires the workflow to be modified to fix, then publishing can be manually reattempted from the Actions tab after fixing it, without having to make a second release on GitHub, or delete and remake the tag, etc. (Jobs that have run already can be re-run, but that would use the workflow as it was for the job, rather than the updated workflow. In contrast, triggering theworkflow_dispatch
event from the Actions tab uses the tip of whatever branch it is run for.) If you choose to do this, the change I'm suggesting is:on: release: types: [published] + workflow_dispatch: