Fix fetch depth #33
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: Build and Publish to PyPI | |
on: | |
release: | |
types: [released] | |
pull_request: | |
branches: [master] | |
paths: | |
- ".github/workflows/publish-pypi.yml" | |
- "server/**" | |
jobs: | |
publish-pypi: | |
name: Upload release to PyPI | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/wdl-lsp | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Build wheels | |
working-directory: server | |
run: python -m pip wheel . --no-deps -w dist | |
- name: Publish package distributions to PyPI | |
if: github.event_name == 'release' | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: server/dist |