From 5feeee6d17cb3fee461eb15e7f09de311e4ff7b2 Mon Sep 17 00:00:00 2001 From: Jannik Kissinger Date: Fri, 14 Jun 2024 17:54:29 +0200 Subject: [PATCH] deactivate separate test publish step (#230) --- .github/workflows/build.yml | 66 ++++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 303dd68..926fef4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -97,15 +97,45 @@ jobs: name: artifact-source-dist path: "./**/dist/*.tar.gz" +# test-publish: +# name: Test PyPI Publishing +# runs-on: ubuntu-latest +# needs: [test, make-wheels, make-sdist] +# # only run jobs if the feature branch is the base repo (not in a fork) +# # TODO separate step, fails PRs from forks due to: "missing or insufficient OIDC token permissions, +# # the ACTIONS_ID_TOKEN_REQUEST_TOKEN environment variable was unset" +# if: github.event.pull_request.head.repo.full_name == github.repository +# permissions: +# id-token: write +# contents: write +# steps: +# - name: Fetch version +# id: fetch_version +# run: echo "version_nr=$(poetry version -s)" >> $GITHUB_OUTPUT +# +# - name: Download all artifacts +# uses: actions/download-artifact@v4 +# +# - name: Copy artifacts to dist/ folder +# run: | +# find . -name 'artifact-*' -exec unzip '{}' \; +# mkdir -p dist/ +# find . -name '*.tar.gz' -exec mv '{}' dist/ \; +# find . -name '*.whl' -exec mv '{}' dist/ \; +# ls -lR dist/ +# +# - name: Test PyPI Publishing +# uses: pypa/gh-action-pypi-publish@release/v1 +# with: +# password: ${{ secrets.TEST_PYPI_DEPLOYMENT_API_KEY }} +# repository-url: https://test.pypi.org/legacy/ +# skip-existing: true - test-publish: - name: Test PyPI Publishing + publish: runs-on: ubuntu-latest + # Note: TODO only run, when test publishing worked needs: [test, make-wheels, make-sdist] - # only run jobs if the feature branch is the base repo (not in a fork) - # TODO fails PRs from forks due to: "missing or insufficient OIDC token permissions, - # the ACTIONS_ID_TOKEN_REQUEST_TOKEN environment variable was unset" - if: github.event.pull_request.head.repo.full_name == github.repository + if: endsWith(github.ref, '/master') permissions: id-token: write contents: write @@ -132,30 +162,6 @@ jobs: repository-url: https://test.pypi.org/legacy/ skip-existing: true - publish: - runs-on: ubuntu-latest - # Note: only runs, when test publishing worked - needs: [test, make-wheels, make-sdist, test-publish] - if: endsWith(github.ref, '/master') - permissions: - id-token: write - contents: write - steps: - - name: Fetch version - id: fetch_version - run: echo "version_nr=$(poetry version -s)" >> $GITHUB_OUTPUT - - - name: Download all artifacts - uses: actions/download-artifact@v4 - - - name: Copy artifacts to dist/ folder - run: | - find . -name 'artifact-*' -exec unzip '{}' \; - mkdir -p dist/ - find . -name '*.tar.gz' -exec mv '{}' dist/ \; - find . -name '*.whl' -exec mv '{}' dist/ \; - ls -lR dist/ - - name: Create GitHub Release id: create_gh_release uses: ncipollo/release-action@v1