Skip to content

Merge pull request #149 from swyddfa/develop #8

Merge pull request #149 from swyddfa/develop

Merge pull request #149 from swyddfa/develop #8

name: 'Release: pytest-lsp'
on:
push:
branches:
- release
paths:
- 'lib/pytest-lsp/**'
jobs:
release:
name: pytest-lsp release
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/pytest-lsp
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- run: |
python --version
python -m pip install --upgrade pip
python -m pip install tox hatch towncrier docutils
name: Setup Environment
- run: |
set -e
./scripts/make_release.py pytest-lsp
name: Set Version
id: info
- name: Package
run: |
cd lib/pytest-lsp
hatch build
- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
with:
name: 'dist'
path: lib/pytest-lsp/dist
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: lib/pytest-lsp/dist/
- name: Create Release
run: |
gh release create "${RELEASE_TAG}" \
--title "pytest-lsp v${VERSION} - ${RELEASE_DATE}" \
-F lib/pytest-lsp/.changes.html \
./lib/pytest-lsp/dist/*
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}