diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e6b4bfcf..a2c32957 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,32 +8,27 @@ jobs: release: name: Release runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/healthchecks-io + permissions: + id-token: write steps: - name: Check out the repository - uses: actions/checkout@v4 + uses: actions/checkout@v4.1.4 with: fetch-depth: 2 - name: Set up Python uses: actions/setup-python@v5.1.0 with: - python-version: "3.10" - - - name: Upgrade pip + python-version: "3.11" + - name: Install pip and poetry run: | - pip install --constraint=.github/workflows/constraints.txt pip + pip install --upgrade --constraint .github/workflows/constraints.txt pip poetry pip --version - - - name: Install Poetry - run: | - pip install --constraint=.github/workflows/constraints.txt poetry poetry-dynamic-versioning poetry --version - - name: Build package run: | - poetry build --ansi - - - name: Publish package on PyPI - uses: pypa/gh-action-pypi-publish@v1.8.14 - with: - user: __token__ - password: ${{ secrets.PYPI_TOKEN }} + poetry build + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1