From 4ed730123909b2195244568a6749f5df499ea083 Mon Sep 17 00:00:00 2001 From: Helio Machado <0x2b3bfa0+git@googlemail.com> Date: Sat, 2 Mar 2024 14:14:13 +0100 Subject: [PATCH] Update GitHub Actions workflows --- .github/workflows/release.yml | 13 ++++++++----- .github/workflows/test.yml | 13 ++++--------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 20c2894..bfe61b3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,19 +6,22 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - run: pipx install poetry + - uses: actions/setup-python@v5 with: + cache: poetry python-version: '3.10' - - run: pip install poetry - run: poetry install + - uses: tschm/token-mint-action@v1.0.3 + id: mint - run: poetry publish --build -u __token__ -p $PYPI_TOKEN env: - PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} + PYPI_TOKEN: ${{ steps.mint.outputs.api-token }} - run: poetry run poe document - uses: peaceiris/actions-gh-pages@v3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ github.token }} publish_dir: ./documentation/module/_build/html publish_branch: documentation force_orphan: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 69c05df..08964eb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,16 +15,11 @@ jobs: - test - coverage steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - run: pipx install poetry + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: + cache: poetry python-version: '3.10' - - uses: actions/cache@v2 - id: cache - with: - path: ~/.cache/pypoetry/virtualenvs - key: ${{ hashFiles('poetry.lock') }} - - run: pip install poetry - run: poetry install - if: steps.cache.outputs.cache-hit != 'true' - run: poetry run poe ${{ matrix.action }}