mirror of
https://github.com/mue/mue.git
synced 2026-06-18 14:37:35 +02:00
Compare commits
6 Commits
sync-workf
...
main-workf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4bcb7f735d | ||
|
|
62689e5d10 | ||
|
|
124d1be1a4 | ||
|
|
8265459ff8 | ||
|
|
a44de6f15b | ||
|
|
0e6eb75f8d |
57
.github/workflows/submit-beta.yml
vendored
Normal file
57
.github/workflows/submit-beta.yml
vendored
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
name: Submit to Browser Stores (Beta)
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [prereleased]
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
tag:
|
||||||
|
description: "Pre-release tag to re-submit (e.g. v7.6.1-beta.3)"
|
||||||
|
required: true
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
submit-beta:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
environment: beta
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Resolve tag and version
|
||||||
|
id: tag
|
||||||
|
run: |
|
||||||
|
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
||||||
|
TAG="${{ github.event.inputs.tag }}"
|
||||||
|
else
|
||||||
|
TAG="${{ github.event.release.tag_name }}"
|
||||||
|
fi
|
||||||
|
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
||||||
|
echo "version=${TAG#v}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Download release ZIPs
|
||||||
|
run: |
|
||||||
|
mkdir -p dist
|
||||||
|
gh release download "${{ steps.tag.outputs.tag }}" \
|
||||||
|
--pattern "chrome-*.zip" \
|
||||||
|
--dir ./dist
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
|
||||||
|
- name: Verify ZIP
|
||||||
|
run: |
|
||||||
|
ls -la dist/
|
||||||
|
test -n "$(ls dist/chrome-*.zip 2>/dev/null)" || \
|
||||||
|
{ echo "chrome ZIP not found in dist/"; exit 1; }
|
||||||
|
|
||||||
|
- name: Submit to Chrome Web Store (Trusted Testers)
|
||||||
|
uses: PlasmoHQ/bpp@v3
|
||||||
|
with:
|
||||||
|
keys: ${{ secrets.SUBMIT_KEYS_BETA }}
|
||||||
|
chrome-zip: dist/chrome-${{ steps.tag.outputs.version }}.zip
|
||||||
|
|
||||||
|
- name: Summary
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
echo "## Beta Store Submission: ${{ steps.tag.outputs.tag }}" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "- Chrome Web Store (trustedTesters)" >> $GITHUB_STEP_SUMMARY
|
||||||
56
.github/workflows/submit.yml
vendored
56
.github/workflows/submit.yml
vendored
@@ -1,27 +1,57 @@
|
|||||||
name: Submit
|
name: Submit to Browser Stores
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
release:
|
||||||
|
types: [released]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
tag:
|
tag:
|
||||||
description: "Release tag to submit, i.e 6.0.5"
|
description: "Release tag to re-submit (e.g. v7.6.1)"
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
submit:
|
submit:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
environment: production
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Chrome
|
- name: Resolve tag and version
|
||||||
uses: browser-actions/setup-chrome@latest
|
id: tag
|
||||||
with:
|
run: |
|
||||||
chrome-version: latest
|
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
||||||
- name: Download Github Release Assets
|
TAG="${{ github.event.inputs.tag }}"
|
||||||
uses: PlasmoHQ/download-release-asset@v1.0.0
|
else
|
||||||
with:
|
TAG="${{ github.event.release.tag_name }}"
|
||||||
tag: ${{ github.event.inputs.tag }}
|
fi
|
||||||
- name: Browser Plugin Publish
|
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
||||||
uses: PlasmoHQ/bpp@v2
|
echo "version=${TAG#v}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Download release ZIPs
|
||||||
|
run: |
|
||||||
|
mkdir -p dist
|
||||||
|
gh release download "${{ steps.tag.outputs.tag }}" \
|
||||||
|
--pattern "chrome-*.zip" \
|
||||||
|
--dir ./dist
|
||||||
env:
|
env:
|
||||||
PUPPETEER_EXECUTABLE_PATH: /opt/hostedtoolcache/chromium/latest/x64/chrome
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
|
||||||
|
- name: Verify ZIP
|
||||||
|
run: |
|
||||||
|
ls -la dist/
|
||||||
|
test -f "dist/chrome-${{ steps.tag.outputs.version }}.zip" || \
|
||||||
|
{ echo "chrome ZIP not found"; exit 1; }
|
||||||
|
|
||||||
|
- name: Submit to Chrome Web Store
|
||||||
|
uses: PlasmoHQ/bpp@v3
|
||||||
with:
|
with:
|
||||||
keys: ${{ secrets.SUBMIT_KEYS }}
|
keys: ${{ secrets.SUBMIT_KEYS }}
|
||||||
|
chrome-zip: dist/chrome-${{ steps.tag.outputs.version }}.zip
|
||||||
|
|
||||||
|
- name: Summary
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
echo "## Store Submission: ${{ steps.tag.outputs.tag }}" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "- Chrome Web Store (listed)" >> $GITHUB_STEP_SUMMARY
|
||||||
|
|||||||
137
.github/workflows/version-bump.yml
vendored
137
.github/workflows/version-bump.yml
vendored
@@ -1,31 +1,18 @@
|
|||||||
name: Version Bump
|
name: Version Bump
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
pull_request:
|
||||||
inputs:
|
types:
|
||||||
bump_type:
|
- closed
|
||||||
description: 'Version bump type'
|
labels:
|
||||||
required: true
|
- 'release'
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- patch # 7.5.0 -> 7.5.1 (bug fixes)
|
|
||||||
- minor # 7.5.0 -> 7.6.0 (new features)
|
|
||||||
- major # 7.5.0 -> 8.0.0 (breaking changes)
|
|
||||||
pre_release:
|
|
||||||
description: 'Pre-release label (leave empty for stable release)'
|
|
||||||
required: false
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- ''
|
|
||||||
- beta
|
|
||||||
- rc
|
|
||||||
- alpha
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
bump-version:
|
bump-version:
|
||||||
|
if: github.event.pull_request.merged == true
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
@@ -44,13 +31,19 @@ jobs:
|
|||||||
git config user.name "github-actions[bot]"
|
git config user.name "github-actions[bot]"
|
||||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
|
||||||
|
- name: Extract bump info from PR
|
||||||
|
id: bump_info
|
||||||
|
run: |
|
||||||
|
BUMP_TYPE=$(echo "${{ github.event.pull_request.body }}" | grep -oP "bump: \K(major|minor|patch)" || echo "patch")
|
||||||
|
IS_RELEASE=$(echo "${{ github.event.pull_request.body }}" | grep -q "is_release: true" && echo "true" || echo "false")
|
||||||
|
|
||||||
|
echo "bump_type=$BUMP_TYPE" >> $GITHUB_OUTPUT
|
||||||
|
echo "is_release=$IS_RELEASE" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Calculate new version
|
- name: Calculate new version
|
||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
CURRENT_VERSION=$(node -p "require('./package.json').version")
|
CURRENT_VERSION=$(node -p "require('./package.json').version")
|
||||||
echo "Current version: $CURRENT_VERSION"
|
|
||||||
|
|
||||||
# Remove any pre-release suffix for base version
|
|
||||||
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"
|
||||||
|
|
||||||
@@ -58,85 +51,75 @@ jobs:
|
|||||||
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
|
case "${{ steps.bump_info.outputs.bump_type }}" in
|
||||||
# Otherwise, bump the version based on type
|
major)
|
||||||
if [ -n "${{ github.event.inputs.pre_release }}" ] && [ "$IS_PRERELEASE" = "true" ]; then
|
MAJOR=$((MAJOR + 1))
|
||||||
# Keep existing base version for iterative betas (7.6.0-beta.1 -> 7.6.0-beta.2)
|
MINOR=0
|
||||||
NEW_VERSION="$BASE_VERSION"
|
PATCH=0
|
||||||
else
|
;;
|
||||||
# Bump version based on type
|
minor)
|
||||||
case "${{ github.event.inputs.bump_type }}" in
|
MINOR=$((MINOR + 1))
|
||||||
major)
|
PATCH=0
|
||||||
MAJOR=$((MAJOR + 1))
|
;;
|
||||||
MINOR=0
|
patch)
|
||||||
PATCH=0
|
PATCH=$((PATCH + 1))
|
||||||
;;
|
;;
|
||||||
minor)
|
esac
|
||||||
MINOR=$((MINOR + 1))
|
|
||||||
PATCH=0
|
|
||||||
;;
|
|
||||||
patch)
|
|
||||||
PATCH=$((PATCH + 1))
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
NEW_VERSION="${MAJOR}.${MINOR}.${PATCH}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Add pre-release label if specified
|
NEW_VERSION="${MAJOR}.${MINOR}.${PATCH}"
|
||||||
if [ -n "${{ github.event.inputs.pre_release }}" ]; then
|
|
||||||
# Get beta number by counting existing beta tags for this version
|
# Add pre-release suffix if NOT a production release AND NOT on main branch
|
||||||
BETA_COUNT=$(git tag -l "v${NEW_VERSION}-${{ github.event.inputs.pre_release }}.*" | wc -l)
|
if [ "${{ steps.bump_info.outputs.is_release }}" != "true" ] && [ "${{ github.ref_name }}" != "main" ]; then
|
||||||
|
BETA_COUNT=$(git tag -l "v${NEW_VERSION}-beta.*" | wc -l)
|
||||||
BETA_NUM=$((BETA_COUNT + 1))
|
BETA_NUM=$((BETA_COUNT + 1))
|
||||||
NEW_VERSION="${NEW_VERSION}-${{ github.event.inputs.pre_release }}.${BETA_NUM}"
|
NEW_VERSION="${NEW_VERSION}-beta.${BETA_NUM}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
|
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
|
||||||
echo "New version will be: $NEW_VERSION"
|
|
||||||
|
|
||||||
- name: Update package.json
|
- name: Update package.json
|
||||||
run: |
|
run: bun x json -I -f package.json -e "this.version='${{ steps.version.outputs.new_version }}'"
|
||||||
bun x json -I -f package.json -e "this.version='${{ steps.version.outputs.new_version }}'"
|
|
||||||
|
|
||||||
- name: Update Chrome manifest
|
- name: Update Chrome manifest
|
||||||
run: |
|
run: bun x json -I -f manifest/chrome.json -e "this.version='${{ steps.version.outputs.new_version }}'"
|
||||||
VERSION_WITHOUT_PRERELEASE=$(echo "${{ steps.version.outputs.new_version }}" | sed 's/-.*$//')
|
|
||||||
bun x json -I -f manifest/chrome.json -e "this.version='${VERSION_WITHOUT_PRERELEASE}'"
|
|
||||||
|
|
||||||
- name: Update Firefox manifest
|
- name: Update Firefox manifest
|
||||||
run: |
|
run: bun x json -I -f manifest/firefox.json -e "this.version='${{ steps.version.outputs.new_version }}'"
|
||||||
VERSION_WITHOUT_PRERELEASE=$(echo "${{ steps.version.outputs.new_version }}" | sed 's/-.*$//')
|
|
||||||
bun x json -I -f manifest/firefox.json -e "this.version='${VERSION_WITHOUT_PRERELEASE}'"
|
|
||||||
|
|
||||||
- name: Update Safari manifest
|
- name: Update Safari manifest
|
||||||
run: |
|
run: bun x json -I -f safari/Mue\ Extension/Resources/manifest.json -e "this.version='${{ steps.version.outputs.new_version }}'"
|
||||||
VERSION_WITHOUT_PRERELEASE=$(echo "${{ steps.version.outputs.new_version }}" | sed 's/-.*$//')
|
|
||||||
bun x json -I -f safari/Mue\ Extension/Resources/manifest.json -e "this.version='${VERSION_WITHOUT_PRERELEASE}'"
|
|
||||||
|
|
||||||
- name: Update Safari Xcode project
|
- name: Update Safari Xcode (4 MARKETING_VERSION entries)
|
||||||
run: |
|
run: sed -i '' "s/MARKETING_VERSION = [^;]*/MARKETING_VERSION = ${{ steps.version.outputs.new_version }}/g" safari/Mue.xcodeproj/project.pbxproj
|
||||||
VERSION_WITHOUT_PRERELEASE=$(echo "${{ steps.version.outputs.new_version }}" | sed 's/-.*$//')
|
|
||||||
sed -i "s/MARKETING_VERSION = [^;]*/MARKETING_VERSION = ${VERSION_WITHOUT_PRERELEASE}/g" safari/Mue.xcodeproj/project.pbxproj
|
|
||||||
|
|
||||||
- name: Update constants.js
|
- name: Update constants.js
|
||||||
run: |
|
run: sed -i '' "s/export const VERSION = '[^']*'/export const VERSION = '${{ steps.version.outputs.new_version }}'/" src/config/constants.js
|
||||||
sed -i "s/export const VERSION = '[^']*'/export const VERSION = '${{ steps.version.outputs.new_version }}'/" src/config/constants.js
|
|
||||||
|
|
||||||
- name: Commit version bump
|
- name: Commit and tag
|
||||||
run: |
|
run: |
|
||||||
git add package.json manifest/chrome.json manifest/firefox.json safari/Mue\ Extension/Resources/manifest.json safari/Mue.xcodeproj/project.pbxproj src/config/constants.js
|
git add package.json manifest/chrome.json manifest/firefox.json safari/Mue\ Extension/Resources/manifest.json safari/Mue.xcodeproj/project.pbxproj src/config/constants.js
|
||||||
git commit -m "chore: bump version to ${{ steps.version.outputs.new_version }}"
|
git commit -m "chore: bump version to ${{ steps.version.outputs.new_version }}"
|
||||||
git tag -a "v${{ steps.version.outputs.new_version }}" -m "Release v${{ steps.version.outputs.new_version }}"
|
git tag -a "v${{ steps.version.outputs.new_version }}" -m "Release v${{ steps.version.outputs.new_version }}"
|
||||||
|
|
||||||
- name: Push changes
|
|
||||||
run: |
|
|
||||||
git push origin ${{ github.ref_name }}
|
git push origin ${{ github.ref_name }}
|
||||||
git push origin "v${{ steps.version.outputs.new_version }}"
|
git push origin "v${{ steps.version.outputs.new_version }}"
|
||||||
|
|
||||||
|
- name: Auto back-merge (main only)
|
||||||
|
if: github.ref_name == 'main'
|
||||||
|
run: |
|
||||||
|
git fetch origin
|
||||||
|
git checkout beta
|
||||||
|
git merge --no-ff origin/main -m "chore: back-merge main into beta"
|
||||||
|
git push origin beta
|
||||||
|
|
||||||
|
git checkout dev
|
||||||
|
git merge --no-ff origin/beta -m "chore: back-merge beta into dev"
|
||||||
|
git push origin dev
|
||||||
|
|
||||||
- name: Summary
|
- name: Summary
|
||||||
run: |
|
run: |
|
||||||
echo "✅ Version bumped to ${{ steps.version.outputs.new_version }}" >> $GITHUB_STEP_SUMMARY
|
echo "✅ Version bumped to ${{ steps.version.outputs.new_version }}" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "📦 Tag created: v${{ steps.version.outputs.new_version }}" >> $GITHUB_STEP_SUMMARY
|
echo "📦 Tag: v${{ steps.version.outputs.new_version }}" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "🔀 Branch: ${{ github.ref_name }}" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "" >> $GITHUB_STEP_SUMMARY
|
echo "" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "### Files updated:" >> $GITHUB_STEP_SUMMARY
|
echo "### Files updated:" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "- package.json" >> $GITHUB_STEP_SUMMARY
|
echo "- package.json" >> $GITHUB_STEP_SUMMARY
|
||||||
@@ -145,3 +128,9 @@ jobs:
|
|||||||
echo "- safari/Mue Extension/Resources/manifest.json" >> $GITHUB_STEP_SUMMARY
|
echo "- safari/Mue Extension/Resources/manifest.json" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "- safari/Mue.xcodeproj/project.pbxproj" >> $GITHUB_STEP_SUMMARY
|
echo "- safari/Mue.xcodeproj/project.pbxproj" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "- src/config/constants.js" >> $GITHUB_STEP_SUMMARY
|
echo "- src/config/constants.js" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "" >> $GITHUB_STEP_SUMMARY
|
||||||
|
if [ "${{ github.ref_name }}" = "main" ]; then
|
||||||
|
echo "### 🔄 Auto back-merge:" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "- main → beta ✅" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "- beta → dev ✅" >> $GITHUB_STEP_SUMMARY
|
||||||
|
fi
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
"@dnd-kit/sortable": "^10.0.0",
|
"@dnd-kit/sortable": "^10.0.0",
|
||||||
"@dnd-kit/utilities": "^3.2.2",
|
"@dnd-kit/utilities": "^3.2.2",
|
||||||
"@eartharoid/i18n": "1.2.1",
|
"@eartharoid/i18n": "1.2.1",
|
||||||
"@floating-ui/react-dom": "2.1.6",
|
"@floating-ui/react-dom": "2.1.8",
|
||||||
"@fontsource/inter": "^5.2.8",
|
"@fontsource/inter": "^5.2.8",
|
||||||
"@fontsource/lexend-deca": "5.0.14",
|
"@fontsource/lexend-deca": "5.0.14",
|
||||||
"@fontsource/montserrat": "5.0.19",
|
"@fontsource/montserrat": "5.0.19",
|
||||||
@@ -42,10 +42,10 @@
|
|||||||
"@commitlint/cli": "^20.3.1",
|
"@commitlint/cli": "^20.3.1",
|
||||||
"@commitlint/config-conventional": "^20.3.1",
|
"@commitlint/config-conventional": "^20.3.1",
|
||||||
"@eartharoid/deep-merge": "^0.0.2",
|
"@eartharoid/deep-merge": "^0.0.2",
|
||||||
"@eslint/js": "^9.39.2",
|
"@eslint/js": "^10.0.1",
|
||||||
"@vitejs/plugin-react-swc": "^4.2.2",
|
"@vitejs/plugin-react-swc": "^4.2.2",
|
||||||
"adm-zip": "0.5.16",
|
"adm-zip": "0.5.17",
|
||||||
"eslint": "^9.39.2",
|
"eslint": "^10.2.0",
|
||||||
"eslint-config-prettier": "^10.1.8",
|
"eslint-config-prettier": "^10.1.8",
|
||||||
"eslint-plugin-jsx-a11y": "^6.10.2",
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
||||||
"eslint-plugin-react": "^7.37.5",
|
"eslint-plugin-react": "^7.37.5",
|
||||||
|
|||||||
Reference in New Issue
Block a user