Skip to content

Commit fd6c6d7

Browse files
stanwuclaude
andcommitted
ci: add release workflow with permanent skill ZIP download
Create GitHub Release with scan-epub-skill.zip on tag push. Tests run before release. Update README download link to Releases page. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c72757e commit fd6c6d7

File tree

2 files changed

+59
-1
lines changed

2 files changed

+59
-1
lines changed

.github/workflows/release.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags: ["v*"]
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
22+
- name: Install dependencies
23+
run: pip install -r requirements-dev.txt
24+
25+
- name: Lint with ruff
26+
run: ruff check epub_safety_scanner.py test_epub_safety_scanner.py
27+
28+
- name: Format check with ruff
29+
run: ruff format --check epub_safety_scanner.py test_epub_safety_scanner.py
30+
31+
- name: Type check with mypy
32+
run: mypy epub_safety_scanner.py
33+
34+
- name: Security check with bandit
35+
run: bandit -c pyproject.toml -r epub_safety_scanner.py
36+
37+
- name: Run tests
38+
run: pytest -v
39+
40+
release:
41+
runs-on: ubuntu-latest
42+
needs: test
43+
permissions:
44+
contents: write
45+
46+
steps:
47+
- uses: actions/checkout@v4
48+
49+
- name: Package skill ZIP
50+
run: |
51+
cp epub_safety_scanner.py skills/scan-epub/epub_safety_scanner.py
52+
cd skills && zip -r ../scan-epub-skill.zip scan-epub/
53+
54+
- name: Create GitHub Release
55+
uses: softprops/action-gh-release@v2
56+
with:
57+
files: scan-epub-skill.zip
58+
generate_release_notes: true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Detect and fix malicious content embedded in EPUB files. Scans entirely in-memor
77
> [!TIP]
88
> For security, always download from this GitHub repository directly. Do not download from third-party sources.
99
10-
**[Download scan-epub-skill.zip](https://github.com/stanwu/epub-safety-scanner/actions/workflows/ci.yml?query=branch%3Amain+is%3Asuccess)** — go to the latest successful run, scroll to **Artifacts**, and download `scan-epub-skill`.
10+
**[Download scan-epub-skill.zip](https://github.com/stanwu/epub-safety-scanner/releases/latest)** from the latest release.
1111

1212
## Features
1313

0 commit comments

Comments
 (0)