Merge pull request #140 from swyddfa/develop #8
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: lsp-devtools' | |
on: | |
push: | |
branches: | |
- release | |
paths: | |
- 'lib/lsp-devtools/**' | |
jobs: | |
release: | |
name: lsp-devtools release | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/lsp-devtools | |
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 hatch towncrier docutils | |
name: Install Build Tools | |
- run: | | |
set -e | |
./scripts/make_release.py lsp-devtools | |
name: Set Version | |
id: info | |
- name: Package | |
run: | | |
cd lib/lsp-devtools | |
hatch build | |
- name: 'Upload Artifact' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: 'dist' | |
path: lib/lsp-devtools/dist | |
- name: Publish | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: lib/lsp-devtools/dist/ | |
- name: Create Release | |
run: | | |
gh release create "${RELEASE_TAG}" \ | |
--title "lsp-devtools v${VERSION} - ${RELEASE_DATE}" \ | |
-F lib/lsp-devtools/.changes.html \ | |
./lib/lsp-devtools/dist/* | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |