mirror of
https://github.com/mue/mue.git
synced 2026-06-08 22:18:40 +02:00
Fix/beta workflow version check (#1131)
* fix(workflows): prevent beta release for non-beta versions * fix(workflows): address copilot PR review feedback - Support iterative beta versions (7.6.0-beta.1 -> 7.6.0-beta.2) - Remove tag trigger from beta workflow to prevent premature releases - Fix tag format in docs/summaries to include 'v' prefix - Clarify deployment approval wording
This commit is contained in:
9
.github/workflows/beta-release.yml
vendored
9
.github/workflows/beta-release.yml
vendored
@@ -4,8 +4,6 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- beta
|
- beta
|
||||||
tags:
|
|
||||||
- 'v*-beta.*'
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@@ -40,6 +38,13 @@ jobs:
|
|||||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
echo "Building version: $VERSION"
|
echo "Building version: $VERSION"
|
||||||
|
|
||||||
|
# Check if this is actually a beta version
|
||||||
|
if [[ ! "$VERSION" =~ -beta\. ]]; then
|
||||||
|
echo "❌ Version $VERSION is not a beta version (must contain '-beta.')"
|
||||||
|
echo "Skipping beta release. Use Version Bump workflow to create a beta version first."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Generate changelog
|
- name: Generate changelog
|
||||||
id: changelog
|
id: changelog
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
2
.github/workflows/production-release.yml
vendored
2
.github/workflows/production-release.yml
vendored
@@ -176,7 +176,7 @@ jobs:
|
|||||||
echo "### ⚠️ Manual Steps Required" >> $GITHUB_STEP_SUMMARY
|
echo "### ⚠️ Manual Steps Required" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "1. Go to [GitHub Actions](https://github.com/${{ github.repository }}/actions/workflows/submit.yml)" >> $GITHUB_STEP_SUMMARY
|
echo "1. Go to [GitHub Actions](https://github.com/${{ github.repository }}/actions/workflows/submit.yml)" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "2. Click 'Run workflow'" >> $GITHUB_STEP_SUMMARY
|
echo "2. Click 'Run workflow'" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "3. Enter tag: \`${{ steps.version.outputs.version }}\`" >> $GITHUB_STEP_SUMMARY
|
echo "3. Enter tag: \`v${{ steps.version.outputs.version }}\`" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "4. Click 'Run workflow' to submit to Chrome/Firefox/Edge stores" >> $GITHUB_STEP_SUMMARY
|
echo "4. Click 'Run workflow' to submit to Chrome/Firefox/Edge stores" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "" >> $GITHUB_STEP_SUMMARY
|
echo "" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "### 📢 Post-Release Checklist" >> $GITHUB_STEP_SUMMARY
|
echo "### 📢 Post-Release Checklist" >> $GITHUB_STEP_SUMMARY
|
||||||
|
|||||||
13
.github/workflows/version-bump.yml
vendored
13
.github/workflows/version-bump.yml
vendored
@@ -54,10 +54,22 @@ jobs:
|
|||||||
BASE_VERSION=$(echo $CURRENT_VERSION | sed 's/-.*$//')
|
BASE_VERSION=$(echo $CURRENT_VERSION | sed 's/-.*$//')
|
||||||
IFS='.' read -r -a VERSION_PARTS <<< "$BASE_VERSION"
|
IFS='.' read -r -a VERSION_PARTS <<< "$BASE_VERSION"
|
||||||
|
|
||||||
|
# Detect if current version is already a pre-release
|
||||||
|
IS_PRERELEASE=false
|
||||||
|
case "$CURRENT_VERSION" in
|
||||||
|
*-*) IS_PRERELEASE=true ;;
|
||||||
|
esac
|
||||||
|
|
||||||
MAJOR="${VERSION_PARTS[0]}"
|
MAJOR="${VERSION_PARTS[0]}"
|
||||||
MINOR="${VERSION_PARTS[1]}"
|
MINOR="${VERSION_PARTS[1]}"
|
||||||
PATCH="${VERSION_PARTS[2]}"
|
PATCH="${VERSION_PARTS[2]}"
|
||||||
|
|
||||||
|
# If requesting a pre-release and current is already a pre-release, keep base version
|
||||||
|
# Otherwise, bump the version based on type
|
||||||
|
if [ -n "${{ github.event.inputs.pre_release }}" ] && [ "$IS_PRERELEASE" = "true" ]; then
|
||||||
|
# Keep existing base version for iterative betas (7.6.0-beta.1 -> 7.6.0-beta.2)
|
||||||
|
NEW_VERSION="$BASE_VERSION"
|
||||||
|
else
|
||||||
# Bump version based on type
|
# Bump version based on type
|
||||||
case "${{ github.event.inputs.bump_type }}" in
|
case "${{ github.event.inputs.bump_type }}" in
|
||||||
major)
|
major)
|
||||||
@@ -75,6 +87,7 @@ jobs:
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
NEW_VERSION="${MAJOR}.${MINOR}.${PATCH}"
|
NEW_VERSION="${MAJOR}.${MINOR}.${PATCH}"
|
||||||
|
fi
|
||||||
|
|
||||||
# Add pre-release label if specified
|
# Add pre-release label if specified
|
||||||
if [ -n "${{ github.event.inputs.pre_release }}" ]; then
|
if [ -n "${{ github.event.inputs.pre_release }}" ]; then
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ When beta is stable:
|
|||||||
7. Manually trigger store submission:
|
7. Manually trigger store submission:
|
||||||
```
|
```
|
||||||
Actions → Submit → Run workflow
|
Actions → Submit → Run workflow
|
||||||
- Enter version tag (e.g., 7.6.0)
|
- Enter version tag (e.g., v7.6.0)
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 4. Emergency Hotfix
|
#### 4. Emergency Hotfix
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ Before starting any release:
|
|||||||
- Check build artifacts
|
- Check build artifacts
|
||||||
- **Approve deployment** in Environments → production
|
- **Approve deployment** in Environments → production
|
||||||
|
|
||||||
4. **Wait 10 minutes** (cooldown period)
|
4. **Review period** - Workflow waits for your approval (10 min deployment protection)
|
||||||
|
|
||||||
5. **Release completes**:
|
5. **Release completes**:
|
||||||
- GitHub release published
|
- GitHub release published
|
||||||
@@ -197,7 +197,7 @@ Before starting any release:
|
|||||||
|
|
||||||
1. Go to **Actions** → **Submit** → **Run workflow**
|
1. Go to **Actions** → **Submit** → **Run workflow**
|
||||||
|
|
||||||
2. Enter version tag: `7.6.0` (no 'v' prefix)
|
2. Enter version tag: `v7.6.0` (include the 'v' prefix to match the release tag)
|
||||||
|
|
||||||
3. Click **Run workflow**
|
3. Click **Run workflow**
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user