Skip to content

Commit

Permalink
Update all Github actions to the latest version
Browse files Browse the repository at this point in the history
And use Dependabot to get notified in the future
  • Loading branch information
Lauszus committed Nov 25, 2024
1 parent 07fd97f commit 666ad86
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 12 deletions.
26 changes: 26 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: 2

updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "08:00"
open-pull-requests-limit: 3
groups:
github-actions:
patterns:
- '*'

- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "08:00"
open-pull-requests-limit: 3
groups:
python-packages:
patterns:
- "*"
31 changes: 19 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,35 @@ name: pyblhost CI
on: [push, pull_request]

jobs:
sdist:
name: Build sdist
dist:
name: Build dist
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
run: pip install -U pip setuptools wheel
- name: Build sdist
run: python setup.py sdist
- name: Upload sdist as artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: pyblhost-${{ github.sha }}
path: dist
retention-days: 1
if-no-files-found: error
checks:
name: Checks
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Update pip
Expand All @@ -51,30 +53,35 @@ jobs:
mkdir -p .mypy_cache # Workaround issue with mypy: https://github.com/tk-woven/mypy-install-types-mre
mypy --install-types --non-interactive .
release:
needs: [sdist, checks]
needs: [dist, checks]
name: Release
runs-on: ubuntu-22.04
timeout-minutes: 5
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: pyblhost-${{ github.sha }}
path: pyblhost
- name: Publish to PyPI
id: pypi
if: startsWith(github.ref, 'refs/tags/')
run: |
pip install -U pip setuptools wheel
pip install -U twine
twine check pyblhost/*
twine upload -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} pyblhost/*
- name: Calculate checksums
run: |
pushd pyblhost
sha256sum * > SHA256SUMS
popd
- name: Publish to Github Release
if: ${{ ! cancelled() && steps.pypi.conclusion == 'success' }}
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: pyblhost/*
draft: true
Expand Down

0 comments on commit 666ad86

Please sign in to comment.