Skip to content

Commit

Permalink
OIDC-based test releases
Browse files Browse the repository at this point in the history
  • Loading branch information
JBWilkie committed Aug 20, 2024
1 parent bef9b35 commit c7d3f46
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/EVENT_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ jobs:
needs: [run_tests, run_e2e]
if: startsWith(github.ref, 'refs/tags/test-')
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -97,24 +99,17 @@ jobs:
uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.3.1"
- name: Check secrets are set
run: |
if [[ -z "${{ secrets.TEST_PYPI_USERNAME }}" || -z "${{ secrets.TEST_PYPI_PASSWORD }}" ]]; then
echo "TEST_PYPI_USERNAME and TEST_PYPI_PASSWORD must be set"
exit 1
fi
- name: Publish on test.pypi.org
env:
POETRY_HTTP_BASIC_PYPI_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }}
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
- name: Build package
run: |
python ./deploy/nightly_package_setup.py
poetry config repositories.test-pypi https://test.pypi.org/legacy/
poetry config http-basic.test-pypi ${{ secrets.TEST_PYPI_USERNAME }} ${{ secrets.TEST_PYPI_PASSWORD }}
poetry publish --build --repository test-pypi
poetry build
python ./deploy/revert_nightly_setup.py
- name: Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

notify_release:
needs: [release]
if: success()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/JOB_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install dependencies with retry
uses: nick-invision/retry@v3
uses: nick-invision/retry@7152eba30c6575329ac0576536151aca5a72780e
with:
timeout_minutes: 10
max_attempts: 3
Expand Down

0 comments on commit c7d3f46

Please sign in to comment.