From 3a37f14f56f726a30a1facb9bbf0a97f7b92b1e5 Mon Sep 17 00:00:00 2001 From: Eric Hansen Date: Tue, 14 May 2024 15:31:11 -0500 Subject: [PATCH 1/2] Update versions of various actions This should suppress the warnings about Node 16 having reached its end of life. --- .github/workflows/ci.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3505aa9..3b6d1d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,9 +32,9 @@ jobs: outputs: wheel-distribution: ${{ steps.wheel-distribution.outputs.path }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: {fetch-depth: 0} # deep clone for setuptools-scm - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 id: setup-python with: {python-version: "3.11"} - name: Run static analysis and format checkers @@ -49,7 +49,7 @@ jobs: - name: Store the distribution files for use in other stages # `tests` and `publish` will use the same pre-built distributions, # so we make sure to release the exact same package that was tested - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: python-distribution-files path: dist/ @@ -68,13 +68,13 @@ jobs: - windows-latest runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 id: setup-python with: python-version: ${{ matrix.python }} - name: Retrieve pre-built distribution files - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: {name: python-distribution-files, path: dist/} - name: Run tests run: >- @@ -108,11 +108,11 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: {python-version: "3.11"} - name: Retrieve pre-built distribution files - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: {name: python-distribution-files, path: dist/} - name: Publish Package env: From 62109da6332b97b299e347b7b32f75b02a6671c5 Mon Sep 17 00:00:00 2001 From: Eric Hansen Date: Fri, 17 May 2024 15:53:17 -0500 Subject: [PATCH 2/2] Added some examples for secret usage --- .github/workflows/ci.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b6d1d0..f6a16de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,20 @@ concurrency: cancel-in-progress: true jobs: + debug: + runs-on: ubuntu-latest + steps: + - name: Test secret 1 + run: >- + echo ${{ secrets.TEST_SECRET }} + - name: Test secret 2 + env: + TEST_SECRET: ${{ secrets.TEST_SECRET }} + run: >- + echo ${{ secrets.TEST_SECRET }} + echo $TEST_SECRET + + prepare: runs-on: ubuntu-latest outputs: @@ -40,6 +54,8 @@ jobs: - name: Run static analysis and format checkers run: pipx run pre-commit run --all-files --show-diff-on-failure - name: Build package distribution files + env: + CI_JOB_TOKEN: ${{ secrets.CI_JOB_TOKEN }} run: >- pipx run --python '${{ steps.setup-python.outputs.python-path }}' tox -e clean,build @@ -60,8 +76,8 @@ jobs: strategy: matrix: python: - - "3.8" # oldest Python supported by PSF - - "3.11" # newest Python that is stable + - "3.8" + - "3.11" platform: - ubuntu-latest - macos-latest