diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0139e8d2..dd895fb0 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -6,15 +6,21 @@ on: jobs: pypi-publish: - name: Upload release to PyPI + name: Build and upload release to PyPI runs-on: ubuntu-latest - environment: - name: pypi - url: https://pypi.org/project/femr - permissions: - id-token: write # IMPORTANT: this permission is mandatory for trusted publishing steps: - # retrieve your distributions here - - - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + run: python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }}