Skip to content

drop python 3.8 support (#26) #10

drop python 3.8 support (#26)

drop python 3.8 support (#26) #10

Workflow file for this run

name: Release
on:
push:
tags:
- "*.*.*"
jobs:
build:
name: Build package
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: poetry
- name: Install dependencies
run: poetry install --sync
- name: Test
run: poetry run pytest
- name: Build
run: poetry build
- name: Set module version
id: module
run: echo "version=$(poetry version --short)" >> $GITHUB_OUTPUT
- name: Fail if poetry version does not match tag
if: github.ref_type != 'tag' || github.ref_name != steps.module.outputs.version
run: exit 1
- name: Upload dist as artifact
uses: actions/upload-artifact@v3
with:
name: built-package
path: dist/
pypi-publish:
name: Upload release to PyPI
needs: [build]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/felt_upload
# name: testpypi
# url: https://test.pypi.org/p/felt-upload/
permissions:
id-token: write
steps:
- name: Download dist as artifact
uses: actions/download-artifact@v3
with:
name: built-package
path: dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
# - name: Publish package distributions to TestPyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# repository-url: https://test.pypi.org/legacy/
gh-release:
name: Github release
needs: [pypi-publish]
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download dist as artifact
uses: actions/download-artifact@v3
with:
name: built-package
path: dist/
- name: Release
uses: softprops/action-gh-release@v1
with:
files: dist/*
generate_release_notes: true