Skip to content

Commit cbac7aa

Browse files
Basic GH Actions (#1)
1 parent 4a07f0e commit cbac7aa

3 files changed

Lines changed: 170 additions & 0 deletions

File tree

.github/release-drafter.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name-template: "v$RESOLVED_VERSION"
2+
tag-template: "v$RESOLVED_VERSION"
3+
categories:
4+
- title: "Breaking"
5+
labels:
6+
- "major"
7+
- "breaking"
8+
- title: "New"
9+
labels:
10+
- "minor"
11+
- "feature"
12+
- "enhancement"
13+
- title: "Bug Fixes"
14+
labels:
15+
- "fix"
16+
- "bugfix"
17+
- "bug"
18+
- title: "Maintenance"
19+
labels:
20+
- "maintenance"
21+
- "chore"
22+
- title: "Documentation"
23+
labels:
24+
- "docs"
25+
- "documentation"
26+
- title: "Other changes"
27+
label: "patch"
28+
- title: "Dependency Updates"
29+
label: "dependencies"
30+
- title: "Security Updates"
31+
label: "security"
32+
collapse-after: 5
33+
exclude-labels:
34+
- "skip-changelog"
35+
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
36+
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
37+
version-resolver:
38+
major:
39+
labels:
40+
- "major"
41+
- "breaking"
42+
minor:
43+
labels:
44+
- "minor"
45+
- "feature"
46+
- "enhancement"
47+
patch:
48+
labels:
49+
- "patch"
50+
- "fix"
51+
- "bugfix"
52+
- "bug"
53+
- "maintenance"
54+
- "docs"
55+
- "documentation"
56+
- "dependencies"
57+
- "security"
58+
default: patch
59+
template: |
60+
# Summary
61+
62+
## What's Changed
63+
64+
$CHANGES
65+
66+
## Contributors
67+
68+
$CONTRIBUTORS
69+
70+
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION

.github/workflows/workflow.pr.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
name: Pull Request checker
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
# Allow one concurrent
9+
concurrency:
10+
group: pr-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
lint:
15+
name: Lint
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout Repo
19+
uses: actions/checkout@v3
20+
21+
- name: Setup Python
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: "3.10"
25+
cache: "poetry"
26+
27+
- name: Setup Poetry
28+
run: |
29+
pip install poetry
30+
poetry --version
31+
32+
- name: Install dependencies
33+
run: poetry install
34+
35+
- name: Check formatting
36+
run: poetry run black --check .
37+
38+
test:
39+
needs: lint
40+
strategy:
41+
fail-fast: false
42+
matrix:
43+
python-version: ["3.8", "3.9", "3.10", "3.11"]
44+
os: [ubuntu-latest, macos-latest, windows-latest]
45+
runs-on: ${{ matrix.os }}
46+
steps:
47+
- name: Checkout Repo
48+
uses: actions/checkout@v3
49+
50+
- name: Setup Python
51+
uses: actions/setup-python@v4
52+
with:
53+
python-version: ${{ matrix.python-version }}
54+
cache: "poetry"
55+
56+
- name: Setup Poetry
57+
run: |
58+
pip install poetry
59+
poetry --version
60+
61+
- name: Install dependencies
62+
run: poetry install
63+
64+
- name: Test Build
65+
run: |
66+
poetry version
67+
poetry build
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Release Drafter
3+
4+
on:
5+
workflow_dispatch:
6+
7+
permissions: write-all
8+
9+
jobs:
10+
release-draft:
11+
if: github.repository_owner == 'DariuszPorowski'
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Release Drafter
21+
uses: release-drafter/release-drafter@v5
22+
id: release-drafter
23+
with:
24+
prerelease: true
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- name: Release URL
29+
run: |
30+
echo "${RELEASE_URL}"
31+
echo "${RELEASE_URL}" >> $GITHUB_STEP_SUMMARY
32+
env:
33+
RELEASE_URL: ${{ steps.release-drafter.outputs.html_url }}

0 commit comments

Comments
 (0)