Closed step21 closed 2 years ago
The token can also be in a GITHUB_TOKEN
environment variable, which can be populated from a GitHub secret.
For example:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Yes, this is what I did instead. It runs, but doesn't create any release. And there does not seem to be any way to make it give output or errors. Is this on purpose as well? I can give you a link to or copy some example output from a github actions run if that helps.
Sure, I'll take a look at what you've got.
Github action config is this:
- name: Create Github Release with scriv
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
scriv github-release
and this is in the Github Action log:
Run scriv github-release
scriv github-release
shell: /usr/bin/bash -e {0}
env:
pythonLocation: /opt/hostedtoolcache/Python/3.10.6/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.6/x64/lib
GITHUB_TOKEN: ***
It looks like a successful run, however, it does not create any release on github. Do you have any idea how to test it or make it give reasonable error messages?
I would have thought it would produce error messages. Can you add --verbosity=DEBUG
to the scriv command line and try it again? Also, can you link me to the action run?
You can find the latest run here: https://github.com/step21/eurlex/actions/runs/3054295037/jobs/4926007039 I made a special new release to run it again on Github. Though locally it was the same result, I wanted to be sure, and as the last release was already published on pypi (which is the step before right now), without a re-release or changing the workflow, it would not get to the scriv step.
I see the problem: your changelog has dates but no version numbers. scriv tries to match changelog entries to tags by their version number. If there's no version number, it can't do that.
How did you want it to make the release?
I can add more logging to the command so that this would be clearer.
Commit 10f0afd now outputs warnings for version-less changelog entries.
Ah thanks, that makes sense. I just followed a tutorial and added changes to scriv, but wasn't aware that I should adjust the version there. Thanks for taking a look.
The improved logging is now released as part of scriv 0.17.0.
I haven't tried it yet, but can
scriv github-release
work as a github action? The token can be supplied, but if it needs to be in a netrc file, I assume it has to be written to that file instead of being supplied to the command, right?