Debian Codegraph @

.github/workflows/python-publish.yml

raw
1 name: Publish to PyPI
2 on: [push, pull_request]
3 jobs:
4 pypi-publish:
5 runs-on: ubuntu-latest
6 if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
7 environment:
8 name: pypi
9 url: https://pypi.org/p/asv_bench_memray
10 permissions:
11 id-token: write
12 steps:
13 - uses: actions/checkout@v3
14 - name: Set up Python
15 uses: actions/setup-python@v3
16 with:
17 python-version: '3.x'
18 - name: Install dependencies
19 run: |
20 python -m pip install --upgrade pip
21 pip install build
22 - name: Build package
23 run: python -m build
24 - name: Publish package
25 uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29