Merge pull request #140 from swyddfa/develop #7
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: '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 }} |