Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
69e1b9a236 |
3 changed files with 47 additions and 18 deletions
24
.forgejo/workflows/release.yaml
Normal file
24
.forgejo/workflows/release.yaml
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: docker
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Get release notes from tag
|
||||||
|
run: echo "RELEASE_NOTES=$(git tag -l --format='%(contents)' ${{ env.GITHUB_REF_NAME }})" >> "$GITHUB_ENV"
|
||||||
|
- name: Install Hatch
|
||||||
|
uses: https://github.com/pypa/hatch@install
|
||||||
|
- name: Build project
|
||||||
|
run: hatch build
|
||||||
|
- name: Create a Forgejo release
|
||||||
|
uses: actions/forgejo-release@v2
|
||||||
|
with:
|
||||||
|
direction: upload
|
||||||
|
url: https://git.hamburg.ccc.de
|
||||||
|
release-dir: dist
|
||||||
|
release-notes: ${{ env.RELEASE_NOTES }}
|
||||||
|
token: ${{ env.GITHUB_TOKEN }}
|
||||||
23
.forgejo/workflows/style.yaml
Normal file
23
.forgejo/workflows/style.yaml
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
# Links & Resources:
|
||||||
|
# - https://hatch.pypa.io/latest/install/#github-actions
|
||||||
|
# - https://docs.astral.sh/ruff/integrations/#github-actions
|
||||||
|
# - https://black.readthedocs.io/en/stable/integrations/github_actions.html
|
||||||
|
on: push
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ruff:
|
||||||
|
runs-on: docker
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Install Hatch
|
||||||
|
uses: https://github.com/pypa/hatch@install
|
||||||
|
- name: Run Ruff
|
||||||
|
run: hatch run lint:ruff check --output-format=github .
|
||||||
|
black:
|
||||||
|
runs-on: docker
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Install Hatch
|
||||||
|
uses: https://github.com/pypa/hatch@install
|
||||||
|
- name: Run Black
|
||||||
|
run: hatch run lint:black --check --diff .
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
# Links & Resources
|
|
||||||
# - https://hub.docker.com/_/python
|
|
||||||
# - https://docs.astral.sh/ruff/installation/
|
|
||||||
# - https://black.readthedocs.io/en/stable/usage_and_configuration/black_docker_image.html
|
|
||||||
|
|
||||||
when:
|
|
||||||
event: [push, pull_request]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: ruff
|
|
||||||
image: python
|
|
||||||
commands:
|
|
||||||
- pip install ruff
|
|
||||||
- ruff check .
|
|
||||||
- name: black
|
|
||||||
image: pyfound/black
|
|
||||||
commands:
|
|
||||||
- black --check --diff .
|
|
||||||
Loading…
Reference in a new issue