Skip to content

Commit

Permalink
Update CI actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mondeja committed Mar 25, 2024
1 parent 801a18d commit 4f55083
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 21 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5.0.0
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
Expand Down Expand Up @@ -65,9 +65,9 @@ jobs:
python-version: "3.12"
py: py312
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4
- name: Set up Python v${{ matrix.python-version }}
uses: actions/setup-python@v5.0.0
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -81,7 +81,7 @@ jobs:
coverage combine
coverage xml
- name: Upload coverage
uses: codecov/codecov-action@v3.1.4
uses: codecov/codecov-action@v4

build-dist:
if: startsWith(github.ref, 'refs/tags/')
Expand All @@ -91,16 +91,16 @@ jobs:
name: Build package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/setup-python@v5.0.0
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: "3.10"
- name: Install build dependencies
run: pip install -U hatch
- name: Build package
run: hatch build
- uses: actions/upload-artifact@v4.0.0
- uses: actions/upload-artifact@v4
with:
path: dist/*
name: distribution
Expand All @@ -110,23 +110,23 @@ jobs:
needs: build-dist
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4.1.0
- uses: actions/download-artifact@v4
with:
name: distribution
path: dist
- uses: pypa/[email protected].11
- uses: pypa/[email protected].14
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
# repository_url: https://test.pypi.org/legacy/
skip_existing: true
skip-existing: true

release:
name: Release
needs: build-dist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4
- name: Get tag metadata
id: tag
run: |
Expand All @@ -141,20 +141,20 @@ jobs:
TAG_BODY="${TAG_BODY//$'\r'/'%0D'}"
echo "body=$TAG_BODY" >> $GITHUB_OUTPUT
- name: Create Release
uses: softprops/action-gh-release@v0.1.15
uses: softprops/action-gh-release@v2
id: create-release
with:
name: ${{ steps.tag.outputs.title }}
tag_name: ${{ steps.tag.outputs.title }}
body: ${{ steps.tag.outputs.body }}
draft: false
prerelease: false
- uses: actions/download-artifact@v4.1.0
- uses: actions/download-artifact@v4
name: Download builds
with:
name: distribution
path: dist
- uses: shogo82148/actions-upload-release-asset@v1.7.2
- uses: shogo82148/actions-upload-release-asset@v1
name: Upload release assets
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pre-commit-autoupdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ jobs:
autoupdate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5.0.0
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit autoupdate
run: pre-commit autoupdate
- name: Open pull request
uses: peter-evans/create-pull-request@v5.0.2
uses: peter-evans/create-pull-request@v5
with:
branch: pre-commit-autoupdate
title: Upgrade pre-commit hooks revisions
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-copyright-years.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
action-update-license-year:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: FantasticFiasco/action-update-license-year@v3.0.2
- uses: FantasticFiasco/action-update-license-year@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .github/workflows/update-gh-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4
with:
token: ${{ secrets.UPDATE_GH_ACTIONS_TOKEN }}

- name: Run GitHub Actions Version Updater
uses: saadmk11/[email protected]
with:
token: ${{ secrets.UPDATE_GH_ACTIONS_TOKEN }}
release_types: major

0 comments on commit 4f55083

Please sign in to comment.