Skip to content

Build and Release

Build and Release #2

Workflow file for this run

name: Build and Release
on:
push:
branches: [ main, master ]
tags: [ 'v*' ]
pull_request:
branches: [ main, master ]
workflow_dispatch:
inputs:
release_type:
description: 'Type of release'
required: true
default: 'development'
type: choice
options:
- development
- pre-release
- release
create_release:
description: 'Create GitHub release'
required: false
default: false
type: boolean
custom_tag:
description: 'Custom tag for release (optional)'
required: false
type: string
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin]
goarch: [amd64, arm64]
exclude:
- goos: windows
goarch: arm64
steps:
- uses: actions/checkout@v4
- name: Print workflow trigger info
run: |
echo "Workflow triggered by: ${{ github.event_name }}"
echo "Branch: ${{ github.ref_name }}"
echo "Release type: ${{ github.event.inputs.release_type }}"
echo "Create release: ${{ github.event.inputs.create_release }}"
echo "Custom tag: ${{ github.event.inputs.custom_tag }}"
echo "Building for: ${{ matrix.goos }}/${{ matrix.goarch }}"
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Get dependencies
run: go mod download
- name: Build binary
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
# Create output directory
mkdir -p dist
# Set binary name based on OS
if [ "$GOOS" = "windows" ]; then
BINARY_NAME="ssh-cracker-$GOOS-$GOARCH.exe"
else
BINARY_NAME="ssh-cracker-$GOOS-$GOARCH"
fi
# Build the binary
go build -ldflags="-s -w" -o dist/$BINARY_NAME ssh.go
# Make it executable (for non-Windows)
if [ "$GOOS" != "windows" ]; then
chmod +x dist/$BINARY_NAME
fi
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ssh-cracker-${{ matrix.goos }}-${{ matrix.goarch }}
path: dist/
release:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' || github.event.inputs.create_release == 'true'
steps:
- uses: actions/checkout@v4
- name: Print release info
run: |
echo "Creating release..."
echo "Event: ${{ github.event_name }}"
echo "Ref: ${{ github.ref }}"
echo "Release type: ${{ github.event.inputs.release_type }}"
echo "Custom tag: ${{ github.event.inputs.custom_tag }}"
- name: Download all artifacts
uses: actions/download-artifact@v3
with:
path: artifacts
- name: Create release directory
run: |
mkdir -p release
find artifacts -name "ssh-cracker-*" -type f -exec cp {} release/ \;
ls -la release/
- name: Generate release tag
id: tag
run: |
if [[ "${{ github.event.inputs.custom_tag }}" != "" ]]; then
echo "tag=${{ github.event.inputs.custom_tag }}" >> $GITHUB_OUTPUT
elif [[ $GITHUB_REF == refs/tags/* ]]; then
echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
else
case "${{ github.event.inputs.release_type }}" in
"release")
echo "tag=v$(date +'%Y.%m.%d')" >> $GITHUB_OUTPUT
;;
"pre-release")
echo "tag=v$(date +'%Y.%m.%d')-pre" >> $GITHUB_OUTPUT
;;
*)
echo "tag=dev-$(date +'%Y%m%d-%H%M%S')" >> $GITHUB_OUTPUT
;;
esac
fi
echo "Generated tag: $(cat $GITHUB_OUTPUT | grep tag= | cut -d= -f2)"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag.outputs.tag }}
release_name: |
${{ github.event.inputs.release_type == 'release' && '🚀 SSHCracker' ||
github.event.inputs.release_type == 'pre-release' && '🧪 SSHCracker (Pre-release)' ||
'🔧 SSHCracker (Development)' }} ${{ steps.tag.outputs.tag }}
body: |
## 🚀 Advanced SSH Brute Force Tool
**Release Type:** ${{ github.event.inputs.release_type || 'automatic' }}
**Build Date:** $(date +'%Y-%m-%d %H:%M:%S UTC')
**Triggered by:** ${{ github.event_name }}
### ✨ Key Features:
- 🍯 **Advanced Honeypot Detection (BETA)** - 9 sophisticated algorithms
- 📊 **Real-time Dashboard** - Live progress tracking and statistics
- 🔍 **Deep System Reconnaissance** - Comprehensive server information
- 🚀 **Multi-platform Support** - Linux, Windows, macOS compatibility
- ⚡ **High Performance** - Multi-threaded concurrent attacks
- 🛡️ **No License Requirements** - Completely free and open source
### 📱 Community:
- 🌐 **English Community**: [@MatrixORG](https://t.me/MatrixORG)
- 🇮🇷 **Persian Community**: [@MatrixFa](https://t.me/MatrixFa)
- 💬 **Chat Group**: [@DD0SChat](https://t.me/DD0SChat)
### 📦 Available Downloads:
| Platform | Architecture | File |
|----------|-------------|------|
| 🐧 Linux | AMD64 | `ssh-cracker-linux-amd64` |
| 🐧 Linux | ARM64 | `ssh-cracker-linux-arm64` |
| 🪟 Windows | AMD64 | `ssh-cracker-windows-amd64.exe` |
| 🍎 macOS | Intel | `ssh-cracker-darwin-amd64` |
| 🍎 macOS | Apple Silicon | `ssh-cracker-darwin-arm64` |
### 🛠️ Quick Start:
1. **Download** the appropriate binary for your platform
2. **Make executable** (Linux/macOS): `chmod +x ssh-cracker-*`
3. **Run**: `./ssh-cracker-*`
4. **Follow** the interactive setup prompts
### 📖 Documentation:
- [English README](README.md)
- [Persian README](README.fa.md)
- [GitHub Repository](https://github.com/Matrix-Community-ORG/SSHCracker)
### ⚠️ Legal & Ethical Use:
This tool is designed for **authorized penetration testing**, **educational purposes**,
and **security research** only. Always ensure you have explicit permission before
testing any systems you do not own.
---
**Full Changelog**: See commits since last release
draft: false
prerelease: ${{ github.event.inputs.release_type == 'pre-release' || github.event.inputs.release_type == 'development' }}
- name: Upload Linux AMD64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./release/ssh-cracker-linux-amd64
asset_name: ssh-cracker-linux-amd64
asset_content_type: application/octet-stream
- name: Upload Linux ARM64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./release/ssh-cracker-linux-arm64
asset_name: ssh-cracker-linux-arm64
asset_content_type: application/octet-stream
- name: Upload Windows AMD64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./release/ssh-cracker-windows-amd64.exe
asset_name: ssh-cracker-windows-amd64.exe
asset_content_type: application/octet-stream
- name: Upload macOS AMD64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./release/ssh-cracker-darwin-amd64
asset_name: ssh-cracker-darwin-amd64
asset_content_type: application/octet-stream
- name: Upload macOS ARM64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./release/ssh-cracker-darwin-arm64
asset_name: ssh-cracker-darwin-arm64
asset_content_type: application/octet-stream