From 5793cbe7fd2f87c7195cc46ec08b3fc8883841b0 Mon Sep 17 00:00:00 2001
From: Thomas Cross
Date: Mon, 13 Jul 2026 15:44:39 +0100
Subject: [PATCH 1/4] dev: update release workflow
---
.github/workflows/release.yaml | 84 +++++++++++++++++++++-------------
1 file changed, 52 insertions(+), 32 deletions(-)
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index fa8188e..e012ae5 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -7,22 +7,37 @@ on:
description: "Type of release (major | minor | patch)"
required: true
default: "patch"
+ skip_tests:
+ description: "Skip tests"
+ required: false
+ default: false
+ type: boolean
permissions:
- contents: write # needed to push commit + tag
+ contents: write # push commit + tag, bump develop
jobs:
tests:
+ if: github.event.inputs.skip_tests != 'true'
uses: ./.github/workflows/tests.yaml
release:
needs: tests
+ if: always() && (github.event.inputs.skip_tests == 'true' || needs.tests.result == 'success')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
+ - name: Enforce main branch
+ shell: bash
+ run: |
+ if [ "${GITHUB_REF}" != "refs/heads/main" ]; then
+ echo "ERROR: Release workflow must be run from main (got ${GITHUB_REF})"
+ exit 1
+ fi
+
- name: Validate input
shell: bash
run: |
@@ -36,22 +51,6 @@ jobs:
with:
python-version: "3.x"
- - name: Install linters
- run: pip install ruff
-
- - name: Auto-format, sort imports, and fix lint
- shell: bash
- run: |
- ruff format .
- ruff check --fix .
- if ! git diff --quiet; then
- git config user.name "github-actions[bot]"
- git config user.email "github-actions[bot]@users.noreply.github.com"
- git add -A
- git commit -m "style: auto-format & lint via ruff"
- git push
- fi
-
- name: Install tools
run: pip install toml
@@ -88,7 +87,7 @@ jobs:
elif release_type == "minor":
minor, patch = minor + 1, 0
else: # patch
- pass # drop -dev
+ pass # drop -dev suffix only
else:
if release_type == "major":
major, minor, patch = major + 1, 0, 0
@@ -133,6 +132,15 @@ jobs:
echo "new_version=$(cat NEW_VERSION.txt)" >> $GITHUB_OUTPUT
echo "next_dev_version=$(cat NEXT_DEV_VERSION.txt)" >> $GITHUB_OUTPUT
+ - name: Duplicate-tag guard
+ shell: bash
+ run: |
+ VERSION="${{ steps.bump.outputs.new_version }}"
+ if git tag -l "v${VERSION}" | grep -q "v${VERSION}"; then
+ echo "ERROR: Tag v${VERSION} already exists. Aborting to avoid broken state."
+ exit 1
+ fi
+
- name: Prepend release section to CHANGELOG.md
shell: bash
run: |
@@ -140,8 +148,8 @@ jobs:
VERSION="${{ steps.bump.outputs.new_version }}"
release_date="$(date -u +%Y-%m-%d)"
- # Determine previous tag if any
- if prev_tag=$(git describe --tags --abbrev=0 2>/dev/null); then
+ # Determine previous tag on main
+ if prev_tag=$(git describe --tags --abbrev=0 origin/main 2>/dev/null); then
range="${prev_tag}..HEAD"
else
range="HEAD"
@@ -161,7 +169,7 @@ jobs:
fix:*|bug:*|bugfix:*) FIXES+=("${s#*: }") ;;
change:*) CHANGES+=("${s#*: }") ;;
dataset:*) DATASETS+=("${s#*: }") ;;
- *) ;; # ignore dev:, docs:, chore:, etc.
+ *) ;; # ignore dev:, docs:, chore:, style:, etc.
esac
done
@@ -209,8 +217,9 @@ jobs:
fi
} > "$new_file"
mv "$new_file" CHANGELOG.md
-
+
- name: Commit and tag
+ id: tag
shell: bash
run: |
VERSION="${{ steps.bump.outputs.new_version }}"
@@ -219,7 +228,7 @@ jobs:
git add pyproject.toml spikee/__init__.py README.md CHANGELOG.md || true
git commit -m "Release ${VERSION}" || echo "No changes to commit."
git tag "v${VERSION}"
- git push origin HEAD --tags
+ git push origin main --tags
- name: Install build tools
run: pip install --upgrade build twine
@@ -232,39 +241,50 @@ jobs:
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- - name: Bump to next dev version
+ - name: Bump develop to next dev version
+ if: always() && steps.tag.outcome == 'success'
shell: bash
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
NEXT_DEV="${{ steps.bump.outputs.next_dev_version }}"
+ export NEXT_DEV
+
+ # Fetch and checkout develop directly
+ git fetch origin develop
+ git checkout develop
+ git pull origin develop
+
python - <${NEXT_DEV}\3", txt, count=1)
+ rf"\g<1>{next_dev}\3", txt, count=1)
if n:
readme.write_text(new_txt)
print("Updated README.md to next dev version.")
else:
print("NOTE: README.md version pattern not found; left unchanged.")
EOF
-
+
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add pyproject.toml spikee/__init__.py README.md
git commit -m "chore: bump version to ${NEXT_DEV}"
- git push origin HEAD
+ git push origin develop
From 088f11be1002a2973de23ef7588c6187b1aba110 Mon Sep 17 00:00:00 2001
From: Thomas Cross
Date: Mon, 13 Jul 2026 15:45:01 +0100
Subject: [PATCH 2/4] dev: update test workflow
Updated workflow to include linting step and support for 'develop' branch.
---
.github/workflows/tests.yaml | 45 +++++++++++++++++++++++++++++++++++-
1 file changed, 44 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml
index 1b66619..dd8fa2f 100644
--- a/.github/workflows/tests.yaml
+++ b/.github/workflows/tests.yaml
@@ -1,4 +1,4 @@
-name: Functional Tests
+name: Lint & Functional Tests
on:
workflow_dispatch:
@@ -6,16 +6,59 @@ on:
pull_request:
branches:
- main
+ - develop
push:
branches:
- main
+ - develop
+
+permissions:
+ contents: write # needed for lint job to push auto-fix commits back to the PR branch
jobs:
+ lint:
+ runs-on: ubuntu-latest
+ # Skipped on workflow_call (release) — lint is not part of the release process
+ if: github.event_name != 'workflow_call'
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ with:
+ ref: ${{ github.event_name == 'pull_request' && github.head_ref || '' }}
+ fetch-depth: 0
+
+ - name: Set up Python
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install ruff
+ run: pip install ruff
+
+ - name: Auto-format, sort imports, and fix lint
+ shell: bash
+ run: |
+ ruff format .
+ ruff check --fix .
+ if ! git diff --quiet; then
+ git config user.name "github-actions[bot]"
+ git config user.email "github-actions[bot]@users.noreply.github.com"
+ git add -A
+ git commit -m "style: auto-format & lint via ruff"
+ git push
+ fi
+
functional-tests:
runs-on: ubuntu-latest
+ needs: [lint]
+ # Always run tests; if lint ran it must have succeeded; if lint was skipped (workflow_call) run anyway
+ if: always() && (needs.lint.result == 'success' || needs.lint.result == 'skipped')
steps:
- name: Checkout repository
uses: actions/checkout@v4
+ with:
+ # On PRs, check out the head ref so we get any lint-fix commits
+ ref: ${{ github.event_name == 'pull_request' && github.head_ref || '' }}
- name: Set up Python
uses: actions/setup-python@v5
From cc63d7c1e5b923fd3cf70c74075b5dfa35d3d871 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Mon, 13 Jul 2026 15:12:11 +0000
Subject: [PATCH 3/4] Release 0.9.0
---
CHANGELOG.md | 2 ++
README.md | 2 +-
pyproject.toml | 2 +-
spikee/__init__.py | 2 +-
4 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a3c6123..a9b1c82 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,8 @@
# Changelog
All notable changes to this project will be documented in this file.
+## [0.9.0] - 2026-07-13
+
## [0.8.0] - 2026-05-19
### Features
diff --git a/README.md b/README.md
index 8761527..7d0ece1 100644
--- a/README.md
+++ b/README.md
@@ -27,7 +27,7 @@
-_Version: 0.8.1-dev_
+_Version: 0.9.0_
Developed by Reversec Labs, `spikee` is a toolkit for assessing the resilience of LLMs, guardrails, and applications against prompt injection and jailbreaking. Spikee's strength is its modular design, which allows for easy customization of every part of the testing process.
diff --git a/pyproject.toml b/pyproject.toml
index ad01f87..b3d6229 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "spikee"
-version = "0.8.1-dev"
+version = "0.9.0"
description = "Spikee - Simple Prompt Injection Kit for Evaluation and Exploitation"
readme = "README.md"
keywords = [ "prompt-injection", "LLM", "cyber-security", "pentesting",]
diff --git a/spikee/__init__.py b/spikee/__init__.py
index baadd08..3e2f46a 100644
--- a/spikee/__init__.py
+++ b/spikee/__init__.py
@@ -1 +1 @@
-__version__ = "0.8.1-dev"
+__version__ = "0.9.0"
From 04f5e77508fae31642e4fd779ac6509067f81fcf Mon Sep 17 00:00:00 2001
From: Thomas Cross
Date: Mon, 13 Jul 2026 16:19:12 +0100
Subject: [PATCH 4/4] dev: update release workflow
---
.github/workflows/release.yaml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index e012ae5..66d7bee 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -46,6 +46,12 @@ jobs:
*) echo "Invalid release_type. Use: major | minor | patch"; exit 1;;
esac
+ - name: Merge develop into main (fast-forward only)
+ shell: bash
+ run: |
+ git fetch origin develop
+ git merge --ff-only origin/develop
+
- name: Set up Python
uses: actions/setup-python@v5
with: