From 038184b20c5cec32507c7b843806745d89ed389c Mon Sep 17 00:00:00 2001 From: o-murphy Date: Fri, 16 Aug 2024 00:09:26 +0300 Subject: [PATCH] trying new deploy script --- .../{python-publish.yml => pypi-publish.yml} | 5 ++++- ...thon-publish-test.yml => pypi-test-publish.yml} | 14 +++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) rename .github/workflows/{python-publish.yml => pypi-publish.yml} (90%) rename .github/workflows/{python-publish-test.yml => pypi-test-publish.yml} (70%) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/pypi-publish.yml similarity index 90% rename from .github/workflows/python-publish.yml rename to .github/workflows/pypi-publish.yml index 81ed76e..088be1d 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -16,6 +16,9 @@ jobs: os: [ ubuntu-latest, windows-latest, macos-13, macos-14 ] runs-on: ${{ matrix.os }} + environment: release + permissions: + id-token: write steps: - uses: actions/checkout@v4 @@ -41,7 +44,7 @@ jobs: - name: List ./dist run: ls ./dist - - name: Publish package to PyPI + - name: Publish package distributions to PyPI run: | python -m twine upload dist/* --skip-existing --verbose --non-interactive env: diff --git a/.github/workflows/python-publish-test.yml b/.github/workflows/pypi-test-publish.yml similarity index 70% rename from .github/workflows/python-publish-test.yml rename to .github/workflows/pypi-test-publish.yml index b591ff1..bfa0275 100644 --- a/.github/workflows/python-publish-test.yml +++ b/.github/workflows/pypi-test-publish.yml @@ -44,12 +44,8 @@ jobs: run: ls ./dist - name: Publish package distributions to Test PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - skip-existing: true - repository-url: https://test.pypi.org/legacy/ -# run: | -# python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/* --skip-existing --verbose --non-interactive -# env: -# TWINE_USERNAME: __token__ -# TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }} + run: | + python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/* --skip-existing --verbose --non-interactive + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}