From 91c785dec13bc4439f9fdcdb9eb53fcff1d9901e Mon Sep 17 00:00:00 2001 From: Sam Schott Date: Sat, 16 Mar 2024 00:02:49 +0100 Subject: [PATCH] move to PyPI trusted publishing --- .github/workflows/publish.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8f895adaf..eea226b2b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,6 +9,11 @@ on: jobs: pypi: runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/maestral + permissions: + id-token: write steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5.0.0 @@ -18,12 +23,14 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install build twine + pip install build - - name: Build and publish + - name: Build run: | python -m build - twine upload dist/* --skip-existing + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 docker-hub: runs-on: ubuntu-latest