Merge pull request #1 from spectriclabs/feat-xm-language-server-linter #11
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: Test and Publish | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.10'] | |
name: Python ${{ matrix.python-version }} testing | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install tox tox-gh-actions | |
- name: Test with tox | |
run: | | |
python -m tox | |
publish: | |
needs: test | |
runs-on: ubuntu-latest | |
environment: publish | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install poetry | |
- name: Build with poetry | |
run: | | |
poetry version `python scripts/generate_version.py` | |
poetry build | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |