diff --git a/.github/workflows/pip_deploy.yml b/.github/workflows/pip_deploy.yml index 78962b9..785bfae 100644 --- a/.github/workflows/pip_deploy.yml +++ b/.github/workflows/pip_deploy.yml @@ -6,12 +6,35 @@ on: workflow_dispatch: jobs: + publish: + name: Create GitHub Release + runs-on: ubuntu-latest + permissions: + contents: write + issues: write + pull-requests: write + steps: + - name: Checkout + uses: actions/checkout@v5 + with: + fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} + - name: Create GitHub Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + npx -p semantic-release \ + -p @semantic-release/changelog \ + -p @semantic-release/git \ + -p @semantic-release/github \ + -p conventional-changelog-conventionalcommits \ + semantic-release release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v5 - name: Set up Python 3.10 - uses: actions/setup-python@v3 + uses: actions/setup-python@v6 with: python-version: "3.10" - name: Install pypa/build diff --git a/.releaserc.json b/.releaserc.json new file mode 100644 index 0000000..1eae292 --- /dev/null +++ b/.releaserc.json @@ -0,0 +1,73 @@ +{ + "branches": ["main"], + "tagFormat": "${version}", + "plugins": [ + [ + "@semantic-release/release-notes-generator", + { + "preset": "conventionalcommits", + "writerOpts": { + "types": [ + { + "type": "feat", + "section": "Features" + }, + { + "type": "fix", + "section": "Bug Fixes" + }, + { + "type": "docs", + "section": "Documentation", + "hidden": false + }, + { + "type": "deps", + "section": "Dependency Updates", + "hidden": false + }, + { + "type": "chore", + "hidden": true + }, + { + "type": "style", + "hidden": true + }, + { + "type": "refactor", + "hidden": true + }, + { + "type": "perf", + "hidden": true + }, + { + "type": "test", + "hidden": true + }, + { + "type": "ci", + "hidden": true + } + ] + } + } + ], + [ + "@semantic-release/changelog", + { + "changelogFile": "CHANGELOG.md", + "changelogTitle": "# Changelog" + } + ], + [ + "@semantic-release/git", + { + "assets": ["**"], + "message": "chore(release): ${nextRelease.version}\n\n${nextRelease.notes} [skip ci]" + } + ], + "@semantic-release/github" + ] +}