cannot create release for python package
builder555 opened this issue · comments
Robert'); DROP TABLE students; -- commented
Steps to reproduce:
- Create a new repo
- Add example to .github/workflows/ci.yml:
on: push: branches: [ master ] jobs: release: runs-on: ubuntu-latest steps: - name: checkout uses: actions/checkout@v4 - name: semantic-release uses: ahmadnassri/action-semantic-release@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- Set permissions on repo to allow R&W for actions
- Add a hello-world example in main.py
- commit & push
Expected results:
Created 0.1.0 release
Actual results:
Error: SemanticReleaseError: Missing package.json
file
Other:
Since this is a python package, it shouldn't try to publish to NPM or search for package.json file.
Ahmad Nassri commented
by default semantic-release
expects to publish an npm package, you'll have to create a configuration file and specify what "plugins" to use... see this own repo .release.json
for an example
Ahmad Nassri commented
if you want the defaults without npm, this should suffice:
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github"
]
}
this will publish GitHub releases...
bonus: if you want to publish to pypi, you'd need to install this npm package then update the config accordingly: https://www.npmjs.com/package/semantic-release-pypi