Skip to content

Commit d0e216d

Browse files
authored
Merge pull request #15 from Thavarshan/feature/alias-qa-setup
feat: add alias support and QA tooling
2 parents dfc37dd + 7c5096f commit d0e216d

20 files changed

+3202
-1824
lines changed

.github/workflows/ci.yml

Lines changed: 525 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/release.yml

Lines changed: 103 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,125 @@
1-
name: Release Validation
1+
name: Release
22

33
on:
44
release:
55
types: [published, prereleased]
66
workflow_dispatch:
77

88
jobs:
9-
# Validate release
10-
release-validation:
11-
name: Release Validation
12-
runs-on: ${{ matrix.os }}
13-
strategy:
14-
matrix:
15-
os: [ubuntu-latest, macos-latest]
16-
9+
# Validate release readiness
10+
release-check:
11+
name: Release Readiness Check
12+
runs-on: ubuntu-latest
1713
steps:
1814
- name: Checkout Repository
1915
uses: actions/checkout@v4
2016

21-
- name: Validate Release Version
17+
- name: Verify Release Assets
18+
run: |
19+
echo "=== Verifying Release Assets ==="
20+
21+
# Check required files exist
22+
required_files=(
23+
"phpvm.sh"
24+
"install.sh"
25+
"README.MD"
26+
"CHANGELOG.md"
27+
"LICENSE"
28+
)
29+
30+
for file in "${required_files[@]}"; do
31+
if [ -f "$file" ]; then
32+
echo "✓ $file exists"
33+
else
34+
echo "✗ Missing required file: $file"
35+
exit 1
36+
fi
37+
done
38+
39+
- name: Validate Version Consistency
2240
run: |
23-
echo "=== Validating Release Version ==="
41+
echo "=== Validating Version Consistency ==="
2442
2543
chmod +x ./phpvm.sh
26-
27-
# Check version output
2844
VERSION_OUTPUT=$(./phpvm.sh version)
29-
echo "Version output: $VERSION_OUTPUT"
45+
echo "Script version: $VERSION_OUTPUT"
3046
31-
if echo "$VERSION_OUTPUT" | grep -q "phpvm version"; then
32-
echo "Version output format is correct"
33-
else
34-
echo "Version output format is incorrect"
35-
exit 1
36-
fi
37-
38-
- name: Test Core Functionality
39-
run: |
40-
echo "=== Testing Core Functionality ==="
47+
# Extract version from output
48+
SCRIPT_VERSION=$(echo "$VERSION_OUTPUT" | grep -oP 'version \K[0-9]+\.[0-9]+\.[0-9]+' || echo "unknown")
4149
42-
./phpvm.sh version
43-
./phpvm.sh help
44-
./phpvm.sh list
45-
./phpvm.sh test
50+
# Check if CHANGELOG mentions recent version
51+
if [ -f CHANGELOG.md ]; then
52+
echo "Checking CHANGELOG for version information..."
53+
head -n 20 CHANGELOG.md
54+
fi
4655
47-
echo "All core commands work"
56+
echo "✓ Version validation completed"
4857
49-
- name: Performance Check
58+
- name: Verify Documentation
5059
run: |
51-
echo "=== Performance Check ==="
52-
53-
time ./phpvm.sh version >/dev/null
54-
time ./phpvm.sh help >/dev/null
55-
56-
echo "Performance check completed"
60+
echo "=== Verifying Documentation ==="
61+
62+
# Check README has essential sections
63+
sections=("Installation" "Usage" "Commands")
64+
65+
for section in "${sections[@]}"; do
66+
if grep -qi "$section" README.MD; then
67+
echo "✓ README contains $section section"
68+
else
69+
echo "⚠ README might be missing $section section"
70+
fi
71+
done
72+
73+
echo "✓ Documentation verification completed"
74+
75+
# Create release artifacts
76+
release-artifacts:
77+
name: Generate Release Artifacts
78+
runs-on: ubuntu-latest
79+
needs: release-check
80+
steps:
81+
- name: Checkout Repository
82+
uses: actions/checkout@v4
5783

58-
- name: Documentation Check
59-
if: runner.os == 'Linux'
84+
- name: Package Release
6085
run: |
61-
echo "=== Documentation Check ==="
62-
63-
# Check that README contains key commands
64-
if grep -q "phpvm version" README.MD; then
65-
echo "README contains version command documentation"
66-
else
67-
echo "README might be missing version command documentation"
68-
fi
69-
70-
if grep -q "phpvm install" README.MD; then
71-
echo "README contains install command documentation"
72-
else
73-
echo "README missing install command documentation"
74-
exit 1
75-
fi
76-
77-
# Check changelog exists
78-
if [ -f CHANGELOG.md ]; then
79-
echo "Changelog file exists"
80-
else
81-
echo "Changelog file missing"
82-
exit 1
83-
fi
84-
85-
echo "Documentation check completed"
86+
echo "=== Packaging Release ==="
87+
88+
# Create release package
89+
mkdir -p dist
90+
cp phpvm.sh dist/
91+
cp install.sh dist/
92+
cp README.MD dist/
93+
cp LICENSE dist/
94+
cp CHANGELOG.md dist/
95+
96+
# Create tarball
97+
tar -czf phpvm-release.tar.gz -C dist .
98+
99+
echo "✓ Release package created: phpvm-release.tar.gz"
100+
ls -lh phpvm-release.tar.gz
101+
102+
- name: Upload Release Artifact
103+
uses: actions/upload-artifact@v4
104+
with:
105+
name: phpvm-release
106+
path: phpvm-release.tar.gz
107+
retention-days: 90
108+
109+
# Post-release notification
110+
release-notify:
111+
name: Release Notification
112+
runs-on: ubuntu-latest
113+
needs: [release-check, release-artifacts]
114+
if: github.event_name == 'release'
115+
steps:
116+
- name: Release Summary
117+
run: |
118+
echo "=== Release Summary ==="
119+
echo "Release: ${{ github.event.release.tag_name }}"
120+
echo "Type: ${{ github.event.release.prerelease && 'Pre-release' || 'Release' }}"
121+
echo "URL: ${{ github.event.release.html_url }}"
122+
echo ""
123+
echo "✅ All release checks passed!"
124+
echo "✅ Release artifacts generated!"
125+
echo "✅ phpvm ${{ github.event.release.tag_name }} is ready!"

0 commit comments

Comments
 (0)