Create GitHub release #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create GitHub release | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
create_release: | |
name: Create GitHub release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Get version | |
id: get_version | |
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Checkout | |
uses: actions/checkout@master | |
with: | |
fetch-depth: 0 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install --user -e ".[dev]" | |
- name: Generate changelog | |
run: | | |
cz changelog ${{ steps.get_version.outputs.VERSION }} --file-name changelog_body.md | |
cat changelog_body.md | |
- name: Create release | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
body_path: changelog_body.md | |
name: Version ${{ steps.get_version.outputs.VERSION }} | |
draft: true | |
prerelease: false |