Skip to content

Fix release workflow (#6) #2

Fix release workflow (#6)

Fix release workflow (#6) #2

Workflow file for this run

name: Release
on:
push:
tags:
- '*.*.*'
jobs:
release:
name: Release
runs-on: ubuntu-22.04
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Set up Python
uses: astral-sh/setup-uv@v4
with:
version: "latest"
python-version: "3.12"
- name: Run install
run: uv run make install
- name: Run lint
run: uv run make lint
# - name: Run tests
# run: uv run make test
- name: Publish package on PyPi
run: uv build && uv publish --username __token__ --password ${{secrets.PYPI_TOKEN}}
# FIXME: Fails on prereleases; https://github.com/mindsers/changelog-reader-action/pull/39
- name: Parse changelog
id: changelog
uses: mindsers/changelog-reader-action@v2
with:
version: ${{ github.ref_name }}
- name: Publish GitHub release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: ${{ steps.changelog.outputs.version }}
body: |
## ${{ steps.changelog.outputs.version }} - ${{ steps.changelog.outputs.date }}
${{ steps.changelog.outputs.changes }}
draft: false
prerelease: ${{ steps.changelog.outputs.status == 'prereleased' }}