ci: add CI and release workflows for hackathon repo
Some checks are pending
CI / lint (push) Waiting to run
CI / pages-check (push) Blocked by required conditions
Release Candidate / tag (push) Waiting to run
Release Candidate / draft (push) Blocked by required conditions

This commit is contained in:
timmy 2026-07-08 14:45:42 +00:00
commit 1c87371574
2 changed files with 62 additions and 0 deletions

27
.gitea/workflows/ci.yml Normal file
View File

@ -0,0 +1,27 @@
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: { python-version: "3.11" }
- run: pip install -r requirements.txt
- run: python3 -m pytest tests/ -q
pages-check:
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v4
- name: Check Pages config
run: |
echo "Pages enabled: ${{ github.event.repository.has_pages }}"

View File

@ -0,0 +1,35 @@
name: Release Candidate
on:
push:
branches: [main]
workflow_dispatch:
jobs:
tag:
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
- name: Auto-tag RC
run: |
set -e
TAG="rc-${{ github.run_number }}"
git tag "$TAG" || true
git push origin "$TAG" || true
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
draft:
runs-on: ubuntu-latest
needs: tag
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
- name: Draft release
run: |
set -e
TAG="${{ needs.tag.outputs.tag }}"
gh release create "$TAG" --draft --title "RC $TAG" --notes "Automated release candidate." || true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}