Skip to content

Commit

Permalink
CI: update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentRDC committed Jun 28, 2024
1 parent b54a7d1 commit 7034742
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 20 deletions.
29 changes: 11 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,26 @@ jobs:
python-version: "3.10"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- uses: actions/cache@v2
- uses: actions/cache@v4
if: startsWith(runner.os, 'Linux')
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt') }}

- uses: actions/cache@v2
- uses: actions/cache@v4
if: startsWith(runner.os, 'macOS')
with:
path: ~/Library/Caches/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt') }}

- uses: actions/cache@v2
- uses: actions/cache@v4
if: startsWith(runner.os, 'Windows')
with:
path: ~\AppData\Local\pip\Cache
Expand Down Expand Up @@ -74,9 +74,9 @@ jobs:
python setup.py sdist bdist_wheel
- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}-py${{ matrix.python-version }}-artifact
name: artifact-${{ runner.os }}-py${{ matrix.python-version }}
path: dist/*
retention-days: 7

Expand All @@ -85,26 +85,19 @@ jobs:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
path: artifacts/
path: dist/
pattern: artifact-*
merge-multiple: true

- name: Create release description
run: |
python release-description.py CHANGELOG.rst > description.md
cat description.md
- name: Move artifacts
run: |
ls --recursive artifacts/
mkdir dist
mv --backup=numbered artifacts/*/** dist
rm -f dist/*~
echo "To be uploaded:"
ls dist
- name: Create release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: psf/black@stable

0 comments on commit 7034742

Please sign in to comment.