11name : Release-plz
22
33on :
4- push :
5- branches :
6- - main
4+ workflow_dispatch : # Manual releases only
5+ inputs :
6+ release_type :
7+ description : ' Type of release (patch, minor, auto) - NO MAJOR BUMPS'
8+ required : false
9+ default : ' auto'
10+ type : choice
11+ options :
12+ - auto
13+ - patch
14+ - minor
15+ dry_run :
16+ description : ' Dry run (no actual release)'
17+ required : false
18+ default : false
19+ type : boolean
720
821jobs :
922 release-plz-release :
1023 name : Release-plz release
1124 runs-on : ubuntu-latest
12- if : ${{ github.repository_owner == 'syncable-dev' }}
25+ if : ${{ github.repository_owner == 'syncable-dev' && github.event.inputs.dry_run != 'true' }}
26+
1327 permissions :
1428 contents : write
1529 steps :
30+ - name : Show manual release inputs
31+ run : |
32+ echo "🚀 Manual Release Configuration:"
33+ echo "Release Type: ${{ github.event.inputs.release_type || 'auto' }}"
34+ echo "Dry Run: ${{ github.event.inputs.dry_run || 'false' }}"
35+ echo "⚠️ Version Constraint: Will stay in 0.x.x range (no 1.0.0 bumps)"
36+
1637 - name : Checkout repository
1738 uses : actions/checkout@v4
1839 with :
1940 fetch-depth : 0
2041 token : ${{ secrets.RELEASE_PLZ_TOKEN }}
2142 - name : Install Rust toolchain
2243 uses : dtolnay/rust-toolchain@stable
44+ - name : Check current version and constraints
45+ run : |
46+ CURRENT_VERSION=$(grep '^version =' Cargo.toml | cut -d'"' -f2)
47+ echo "📊 Current version: $CURRENT_VERSION"
48+ echo "📋 Release type: ${{ github.event.inputs.release_type || 'auto' }}"
49+ echo "🎯 Version constraint: Max 0.99.99 (stays in 0.x.x range)"
50+ echo "✅ Safe from automatic 1.0.0 bumps"
2351 - name : Run release-plz
2452 uses : release-plz/action@v0.5
2553 with :
@@ -28,17 +56,56 @@ jobs:
2856 GITHUB_TOKEN : ${{ secrets.RELEASE_PLZ_TOKEN }}
2957 CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
3058
59+ release-plz-dry-run :
60+ name : Release-plz dry run
61+ runs-on : ubuntu-latest
62+ if : ${{ github.repository_owner == 'syncable-dev' && github.event.inputs.dry_run == 'true' }}
63+ permissions :
64+ contents : read
65+ steps :
66+ - name : Show dry run information
67+ run : |
68+ echo "🧪 DRY RUN MODE - No actual release will be performed"
69+ echo "Release Type: ${{ github.event.inputs.release_type || 'auto' }}"
70+ echo "This would analyze the repository and show what changes would be released."
71+
72+ - name : Checkout repository
73+ uses : actions/checkout@v4
74+ with :
75+ fetch-depth : 0
76+ token : ${{ secrets.RELEASE_PLZ_TOKEN }}
77+ - name : Install Rust toolchain
78+ uses : dtolnay/rust-toolchain@stable
79+ - name : Analyze release changes (dry run)
80+ run : |
81+ CURRENT_VERSION=$(grep '^version =' Cargo.toml | cut -d'"' -f2)
82+ echo "📊 Analyzing repository for potential release..."
83+ echo "Current version: $CURRENT_VERSION"
84+ echo "Release type: ${{ github.event.inputs.release_type || 'auto' }}"
85+ echo "🎯 Version constraint: Max 0.99.99 (will NOT bump to 1.0.0)"
86+ echo ""
87+ echo "Recent commits:"
88+ git log --oneline -10
89+ echo ""
90+ echo "✅ Dry run complete - no actual release performed"
91+ echo "🛡️ Protected from major version bumps!"
92+
3193 release-plz-pr :
3294 name : Release-plz PR
3395 runs-on : ubuntu-latest
34- if : ${{ github.repository_owner == 'syncable-dev' }}
96+ if : ${{ github.repository_owner == 'syncable-dev' && github.event.inputs.dry_run != 'true' }}
3597 permissions :
3698 pull-requests : write
3799 contents : write
38100 concurrency :
39101 group : release-plz-${{ github.ref }}
40102 cancel-in-progress : false
41103 steps :
104+ - name : Show manual release inputs
105+ run : |
106+ echo "📝 Creating Release PR with configuration:"
107+ echo "Release Type: ${{ github.event.inputs.release_type || 'auto' }}"
108+
42109 - name : Checkout repository
43110 uses : actions/checkout@v4
44111 with :
0 commit comments