diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index eb01cd1..c9f4c80 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,23 +5,7 @@ on: types: [published] jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 - with: - python-version: 3.11 - cache-dependency-path: pyproject.toml - - run: | - pip install poetry - poetry build - - uses: actions/upload-artifact@v3 - with: - path: ./dist - publish: - needs: ['build'] environment: 'publish' name: Publish release to PyPi @@ -30,7 +14,19 @@ jobs: # IMPORTANT: this permission is mandatory for trusted publishing id-token: write steps: - - uses: actions/download-artifact@v3 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: 3.11 + cache-dependency-path: pyproject.toml + - uses: actions/cache@v3 + id: cache + with: + path: ${{ env.pythonLocation }} + key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-publish + - run: | + pip install poetry + poetry build - name: Publish uses: pypa/gh-action-pypi-publish@v1.8.6 with: