Skip to content

Update CI, lint, prepare 1.1.0 release (#16) #6

Update CI, lint, prepare 1.1.0 release (#16)

Update CI, lint, prepare 1.1.0 release (#16) #6

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@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.13'
- name: Set up Poetry
uses: snok/install-poetry@v1
- name: Install project
run: poetry install
- name: Run lint
run: poetry run make lint
- name: Run tests
run: poetry run make test
- name: Publish package on PyPi
run: |
poetry config http-basic.pypi __token__ ${{secrets.PYPI_TOKEN}}
poetry build
poetry publish
# 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' }}