diff --git a/.github/workflows/dev_test_publish.yml b/.github/workflows/dev_test_publish.yml index 2054270..fbc2a9d 100644 --- a/.github/workflows/dev_test_publish.yml +++ b/.github/workflows/dev_test_publish.yml @@ -23,6 +23,7 @@ jobs: test: name: Test runs-on: ubuntu-latest + steps: - name: Checkout code uses: actions/checkout@v4 @@ -30,7 +31,7 @@ jobs: ref: 'dev' - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.10.9' @@ -50,9 +51,11 @@ jobs: run: pytest test/ >> $GITHUB_STEP_SUMMARY build: - name: Build and Publish + name: Build runs-on: ubuntu-latest needs: [test] + permissions: + id-token: write steps: - name : Checkout code uses : actions/checkout@v4 @@ -60,7 +63,7 @@ jobs: ref: 'dev' - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.10.9' @@ -73,7 +76,14 @@ jobs: python setup.py bdist_wheel >> $GITHUB_STEP_SUMMARY python setup.py sdist >> $GITHUB_STEP_SUMMARY - - name: Upload Artifact + publish: + name: Publish + runs-on: ubuntu-latest + needs: [build] + permissions: + id-token: write + steps: + - name: GitHub Artifact Upload uses: actions/upload-artifact@v4 with: name: Wheel_library @@ -82,7 +92,4 @@ jobs: - name: Publish package to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 with: - user: __token__ - password: ${{ secrets.TEST_PYPI_API_TOKEN }} repository-url: https://test.pypi.org/legacy/ - skip-existing: true