Skip to content

Commit 812b5ed

Browse files
Alex HolmbergAlex Holmberg
authored andcommitted
patch: updated release cycles and rules
1 parent f9bf3bc commit 812b5ed

2 files changed

Lines changed: 112 additions & 5 deletions

File tree

.github/workflows/release-plz.yml

Lines changed: 72 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,53 @@
11
name: Release-plz
22

33
on:
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

821
jobs:
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:

release-plz.toml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
[workspace]
2+
# Only create releases for these packages
3+
packages = ["syncable-cli"]
4+
5+
# Git configuration
6+
git_release_enable = true
7+
git_tag_enable = true
8+
publish = true
9+
10+
# Release behavior - Manual releases only
11+
release_always = false # Don't release if no changes
12+
allow_dirty = false # Require clean working directory
13+
14+
# Changelog configuration
15+
changelog_update = true
16+
changelog_path = "CHANGELOG.md"
17+
18+
# Manual release configuration
19+
[package.syncable-cli]
20+
# Manual control over version bumping
21+
# This will be overridden by workflow_dispatch inputs
22+
release = "auto"
23+
24+
# Version constraints - STAY IN 0.x.x RANGE
25+
# Prevent automatic major version bumps to 1.0.0
26+
max_version = "0.99.99" # Stay below 1.0.0
27+
allow_breaking_changes = false # Prevent BREAKING CHANGE commits from bumping to 1.0
28+
29+
# Safety checks for manual releases
30+
ignore_merge_commits = false # Allow merge commits in manual releases
31+
semver_check = true # Ensure semantic versioning compliance
32+
pre_release = false # Don't create pre-release versions automatically
33+
34+
# Version increment rules for 0.x.x development
35+
# patch: 0.5.4 → 0.5.5 (bug fixes)
36+
# minor: 0.5.4 → 0.6.0 (new features)
37+
# major: DISABLED until ready for 1.0.0
38+
39+
# Changelog customization for manual releases
40+
changelog_config = "cliff.toml" # Optional: custom changelog config

0 commit comments

Comments
 (0)