diff --git a/.github/assets/Logo.png b/.github/assets/Logo.png new file mode 100644 index 0000000..be7e36b Binary files /dev/null and b/.github/assets/Logo.png differ diff --git a/.github/workflows/branch-flow.yml b/.github/workflows/branch-flow.yml new file mode 100644 index 0000000..b14a211 --- /dev/null +++ b/.github/workflows/branch-flow.yml @@ -0,0 +1,78 @@ +name: "Branch Flow Protection" + +on: + pull_request: + +jobs: + enforce-branch-flow: + runs-on: ubuntu-latest + + steps: + - name: Validate PR branch flow + env: + SOURCE: ${{ github.head_ref }} + TARGET: ${{ github.base_ref }} + + run: | + echo "PR: $SOURCE -> $TARGET" + + case "$SOURCE" in + + # Block main going into lower branches + main) + echo "🚀 $SOURCE -❌-> 🎯 $TARGET" + echo " " + echo "❌ main cannot merge downward." + echo "⚠️ Error: Merging from main into '$TARGET' is prohibited." + exit 1 + ;; + + # Hotfix/* branches can only go into main + hotfix/*) + if [[ "$TARGET" != "main" ]]; then + echo "🚀 $SOURCE -❌-> 🎯 $TARGET" + echo " " + echo "❌ hotfix/* branches must target main." + echo "⚠️ Error: Merging from $SOURCE into '$TARGET' is prohibited." + exit 1 + fi + ;; + + # Develop branches can only go into main + develop) + if [["$TARGET" != "main" ]]; then + echo "🚀 $SOURCE -❌-> 🎯 $TARGET" + echo " " + echo "❌ develop branch must target main." + echo "⚠️ Error: Merging from $SOURCE into '$TARGET' is prohibited." + exit 1 + fi + ;; + + # Features/* branches can only go into develop + feature/*) + if [[ "$TARGET" != "develop" ]]; then + echo "🚀 $SOURCE -❌-> 🎯 $TARGET" + echo " " + echo "❌ feature/* branches must target develop." + echo "⚠️ Error: Merging from $SOURCE into '$TARGET' is prohibited." + exit 1 + fi + ;; + + # Bugfixes/* branches can only go into develop + bugfix/*) + if [[ "$TARGET" != "develop" ]]; then + echo "🚀 $SOURCE -❌-> 🎯 $TARGET" + echo " " + echo "❌ bugfix/* branches must target develop." + echo "⚠️ Error: Merging from $SOURCE into '$TARGET' is prohibited." + exit 1 + fi + ;; + + esac + + echo "✅ Branch flow is valid." + echo " " + echo "🚀 $SOURCE -✅-> 🎯 $TARGET" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e8274ce..b4d9327 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest permissions: id-token: write - contents: read + contents: write steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 diff --git a/README.md b/README.md index 65d2aee..e43916a 100644 --- a/README.md +++ b/README.md @@ -1 +1,7 @@ -# ForgePass - Secure Random Password Generator \ No newline at end of file +

ForgePass Logo

+ +

ForgePass

+ +

Secure Random Password Generator

+ +--- \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 92d5d60..7dd915f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,11 @@ [build-system] -requires = ["setuptools>=61.0"] +requires = ["setuptools>=61.0", "setuptools-scm>=8.0"] build-backend = "setuptools.build_meta" [project] name = "forgepass" -version = "0.1.1" +# version = "0.1.0" +dynamic = ["version"] description = "A cryptographically secure random password generator CLI." authors = [ { name = "QBitFoundry", email = "75433298+QBitFoundry@users.noreply.github.com" } @@ -21,6 +22,9 @@ classifiers = [ [project.scripts] forgepass = "forgepass.password:main" +[tool.versioningit] +# Activates git tag fetching + [tool.pytest.ini_options] testpaths = ["tests"]