commit 1c8737157425ccf83e6b37296e09944e9bc91474 Author: timmy Date: Wed Jul 8 14:45:42 2026 +0000 ci: add CI and release workflows for hackathon repo diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..f04cae4 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -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 }}" diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 0000000..c6082c0 --- /dev/null +++ b/.gitea/workflows/release.yml @@ -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 }}