Skip to content

Commit

Permalink
Add github related config files
Browse files Browse the repository at this point in the history
  • Loading branch information
arenekosreal committed Aug 28, 2024
1 parent dc466cd commit 2e94637
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
- package-ecosystem: pip
directory: /
schedule:
interval: monthly
54 changes: 54 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Test, build and create releases.
on:
push:
branches:
- 'main'
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
pull_request:
branches:
- 'main'
workflow_dispatch:

jobs:
test:
name: Test project
strategy:
matrix:
os:
- "windows-latest"
- "ubuntu-latest"
- "macos-latest"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pdm
uses: pdm-project/setup-pdm@v4
- name: Install dependencies
run: pdm install --dev --group=uvloop
- name: Test project
run: pdm run pytest

build-and-release:
name: Build project and release if needed
runs-on: "ubuntu-latest"
needs: "test"
permissions:
contents: "write"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pdm
uses: pdm-project/setup-pdm@v4
- name: Install dependencies
run: pdm install --dev --group=uvloop
- name: Build project
run: pdm build
- name: Release
if: github.ref_type == 'tag'
uses: softprops/action-gh-release@v2
with:
files: "dist/*"
generate_release_notes: true
fail_on_unmatched_files: true

0 comments on commit 2e94637

Please sign in to comment.