Skip to content

Commit 71a3af0

Browse files
authored
Feature/upgrade GitHub workflows (#452)
* Update GitHub Action versions * Also update actions/checkout * Update CHANGELOG
1 parent e73d582 commit 71a3af0

File tree

6 files changed

+32
-30
lines changed

6 files changed

+32
-30
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,10 @@ jobs:
3838
with:
3939
python-version: ${{ matrix.python }}
4040
architecture: 'x64'
41-
42-
- name: Get pip cache dir
43-
id: pip-cache
44-
run: |
45-
echo "::set-output name=dir::$(python -m pip cache dir)"
46-
47-
- name: Cache wheels
48-
uses: actions/cache@v3
49-
with:
50-
path: ${{ steps.pip-cache.outputs.dir }}
51-
key: ${{ runner.os }}-${{ matrix.python }}-pip-${{ hashFiles('**/setup.cfg') }}
52-
restore-keys: ${{ runner.os }}-${{ matrix.python }}-pip-
41+
cache: 'pip'
42+
cache-dependency-path: |
43+
setup.cfg
44+
pyproject.toml
5345
5446
- name: Generate requirement file (Unix)
5547
if: runner.os != 'Windows'
@@ -312,6 +304,9 @@ jobs:
312304
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
313305
314306
- uses: actions/setup-python@v4
307+
with:
308+
python-version: '3.x'
309+
architecture: 'x64'
315310

316311
- name: Install docs & setup requirements
317312
run: |

.github/workflows/draft_release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Install git-flow
1515
run: sudo apt update && sudo apt install -y git-flow
1616

17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v3
1818

1919
- name: Configure git-flow
2020
run: |

.github/workflows/format.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,22 @@ jobs:
1414
name: Format and static analysis
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v3
1818
- name: Get history and tags for SCM versioning to work
1919
if: ${{ !env.ACT }}
2020
run: |
2121
git fetch --prune --unshallow
2222
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
23-
- uses: actions/setup-python@v2
23+
24+
- uses: actions/setup-python@v4
25+
with:
26+
python-version: '3.x'
2427

2528
- name: Install pre-commit
2629
run: python3 -m pip install --upgrade pre-commit 'virtualenv!=20.11'
2730

2831
- name: Cache pre-commit hooks
29-
uses: actions/cache@v2
32+
uses: actions/cache@v3
3033
with:
3134
path: ~/.cache/pre-commit
3235
key: pre-commit-${{ hashFiles('**/.pre-commit-config.yaml') }}
@@ -46,7 +49,7 @@ jobs:
4649
CXX: clang++
4750

4851
steps:
49-
- uses: actions/checkout@v2
52+
- uses: actions/checkout@v3
5053

5154
- name: Prepare env
5255
run: >

.github/workflows/publish_release.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ jobs:
3030
with:
3131
platforms: arm64
3232

33-
- uses: actions/checkout@v2
33+
- uses: actions/checkout@v3
3434
if: github.event_name != 'workflow_dispatch'
3535

36-
- uses: actions/checkout@v2
36+
- uses: actions/checkout@v3
3737
if: github.event_name == 'workflow_dispatch'
3838
with:
3939
ref: 'master'
@@ -82,7 +82,9 @@ jobs:
8282
8383
# ========================================================================
8484

85-
- uses: actions/setup-python@v2
85+
- uses: actions/setup-python@v4
86+
with:
87+
python-version: '3.x'
8688

8789
- name: Install Python packages
8890
run: python -m pip install -U --prefer-binary pip setuptools build wheel twine 'cibuildwheel<3,>=2'
@@ -113,21 +115,21 @@ jobs:
113115
CIBW_TEST_SKIP: '*'
114116

115117
- name: Files for Pypi upload
116-
uses: actions/upload-artifact@v2
118+
uses: actions/upload-artifact@v3
117119
if: steps.src-dist.outcome == 'success'
118120
with:
119121
name: pypy_wheels
120122
path: ./dist
121123

122124
- name: Binary wheels
123-
uses: actions/upload-artifact@v2
125+
uses: actions/upload-artifact@v3
124126
if: steps.binary-dist.outcome == 'success'
125127
with:
126128
name: wheels
127129
path: ./binary_dist
128130

129131
- name: Binary wheels that failed tests
130-
uses: actions/upload-artifact@v2
132+
uses: actions/upload-artifact@v3
131133
if: steps.failed-dist.outcome == 'success'
132134
with:
133135
name: failed_wheels
@@ -175,17 +177,17 @@ jobs:
175177
# ------------------------------------------------------------------------
176178
# Checkout repository to get CHANGELOG
177179

178-
- uses: actions/checkout@v2
180+
- uses: actions/checkout@v3
179181
if: github.event_name != 'workflow_dispatch'
180182

181-
- uses: actions/checkout@v2
183+
- uses: actions/checkout@v3
182184
if: github.event_name == 'workflow_dispatch'
183185
with:
184186
ref: 'master'
185187

186188
# ------------------------------------------------------------------------
187189

188-
- uses: actions/download-artifact@v2
190+
- uses: actions/download-artifact@v3
189191

190192
# Code below inspired from this action:
191193
# - uses: taiki-e/create-gh-release-action@v1
@@ -220,9 +222,11 @@ jobs:
220222
runs-on: ubuntu-latest
221223
needs: release
222224
steps:
223-
- uses: actions/setup-python@v2
225+
- uses: actions/setup-python@v4
226+
with:
227+
python-version: '3.x'
224228

225-
- uses: actions/download-artifact@v2
229+
- uses: actions/download-artifact@v3
226230

227231
- name: Publish standard package
228232
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/pull_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
if: github.ref != 'refs/heads/master'
1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v3
1313

1414
- id: changelog-enforcer
1515
uses: dangoslen/changelog-enforcer@v3

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
### Repository
1515

16-
- Update GitHub workflow action versions
16+
- Update all GitHub workflow action versions
1717

1818
## [v0.8.0] - 2022-10-18
1919

0 commit comments

Comments
 (0)