From ba2e60fa793e3e133af71ab6cadf7d0384996ed2 Mon Sep 17 00:00:00 2001 From: Ethan Steinberg Date: Mon, 11 Mar 2024 10:42:09 -0700 Subject: [PATCH] Update build.yaml --- .github/workflows/build.yaml | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) 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 }}