diff --git a/.github/workflows/release-interact.yml b/.github/workflows/release-interact.yml
index 4891aaf1..fd8e0e89 100644
--- a/.github/workflows/release-interact.yml
+++ b/.github/workflows/release-interact.yml
@@ -133,8 +133,10 @@ jobs:
git config user.name "github-actions[bot]"
git add .
git commit -m "chore: bump @wix/interact to ${{ steps.get_version.outputs.version }}"
- git tag "interact@${{ steps.get_version.outputs.version }}"
- git push --follow-tags origin ${{ steps.release_branch.outputs.name }}
+ TAG="interact@${{ steps.get_version.outputs.version }}"
+ git tag -a "$TAG" -m "chore: release @wix/interact ${{ steps.get_version.outputs.version }}"
+ git push origin ${{ steps.release_branch.outputs.name }}
+ git push origin "$TAG"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/release-motion-presets.yml b/.github/workflows/release-motion-presets.yml
index 6d29c89f..b5db345b 100644
--- a/.github/workflows/release-motion-presets.yml
+++ b/.github/workflows/release-motion-presets.yml
@@ -94,8 +94,10 @@ jobs:
git config user.name "github-actions[bot]"
git add .
git commit -m "chore: bump @wix/motion-presets to ${{ steps.get_version.outputs.version }}"
- git tag "motion-presets@${{ steps.get_version.outputs.version }}"
- git push --follow-tags origin release
+ TAG="motion-presets@${{ steps.get_version.outputs.version }}"
+ git tag -a "$TAG" -m "chore: release @wix/motion-presets ${{ steps.get_version.outputs.version }}"
+ git push origin release
+ git push origin "$TAG"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/release-motion.yml b/.github/workflows/release-motion.yml
index c0573a49..adabe90b 100644
--- a/.github/workflows/release-motion.yml
+++ b/.github/workflows/release-motion.yml
@@ -115,8 +115,10 @@ jobs:
git config user.name "github-actions[bot]"
git add .
git commit -m "chore: bump @wix/motion to ${{ steps.get_version.outputs.version }}"
- git tag "motion@${{ steps.get_version.outputs.version }}"
- git push --follow-tags origin ${{ steps.release_branch.outputs.name }}
+ TAG="motion@${{ steps.get_version.outputs.version }}"
+ git tag -a "$TAG" -m "chore: release @wix/motion ${{ steps.get_version.outputs.version }}"
+ git push origin ${{ steps.release_branch.outputs.name }}
+ git push origin "$TAG"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/sync-release-tags.yml b/.github/workflows/sync-release-tags.yml
new file mode 100644
index 00000000..5fbdaca3
--- /dev/null
+++ b/.github/workflows/sync-release-tags.yml
@@ -0,0 +1,66 @@
+name: Sync Release Tags on Master
+
+# Release PRs are squash-merged, so tags created on the release branch do not
+# land on master. Re-point (or create) package tags on the merge commit.
+on:
+ push:
+ branches: [master]
+
+permissions:
+ contents: write
+
+env:
+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
+
+jobs:
+ sync-tags:
+ if: "contains(github.event.head_commit.message, 'chore: bump @wix/')"
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
+ with:
+ fetch-depth: 0
+ token: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Create or update package tags on master
+ run: |
+ git config user.email "github-actions[bot]@users.noreply.github.com"
+ git config user.name "github-actions[bot]"
+
+ create_or_update_tag() {
+ local tag_prefix="$1"
+ local pkg_path="$2"
+ local version tag remote_sha head_sha
+
+ version=$(node -p "require('./${pkg_path}/package.json').version")
+ tag="${tag_prefix}@${version}"
+ head_sha=$(git rev-parse HEAD)
+
+ if git ls-remote --tags origin "refs/tags/${tag}" | grep -q .; then
+ remote_sha=$(git ls-remote --tags origin "refs/tags/${tag}" | awk '{print $1}')
+ if [ "$remote_sha" = "$head_sha" ]; then
+ echo "Tag ${tag} already on master HEAD, skipping"
+ return
+ fi
+ echo "Moving tag ${tag} to master HEAD"
+ git tag -fa "${tag}" -m "chore: release @wix/${tag_prefix} ${version}"
+ git push origin "refs/tags/${tag}" --force
+ else
+ echo "Creating tag ${tag} on master"
+ git tag -a "${tag}" -m "chore: release @wix/${tag_prefix} ${version}"
+ git push origin "${tag}"
+ fi
+ }
+
+ changed_files=$(git diff-tree --no-commit-id --name-only -r HEAD)
+
+ if echo "$changed_files" | grep -q '^packages/interact/package.json$'; then
+ create_or_update_tag interact packages/interact
+ fi
+ if echo "$changed_files" | grep -q '^packages/motion/package.json$'; then
+ create_or_update_tag motion packages/motion
+ fi
+ if echo "$changed_files" | grep -q '^packages/motion-presets/package.json$'; then
+ create_or_update_tag motion-presets packages/motion-presets
+ fi
diff --git a/apps/website/assets/js/modal.js b/apps/website/assets/js/modal.js
index 1cfe5fde..8e4a2d22 100644
--- a/apps/website/assets/js/modal.js
+++ b/apps/website/assets/js/modal.js
@@ -10,6 +10,7 @@ let cmEditor = null;
let cmWrapper = null;
let originalSource = '';
let htmlSource = '';
+let htmlPath = '';
let isCodeMode = false;
const CLOSE_SVG = ``;
@@ -172,6 +173,42 @@ function resetCode() {
htmlSource = originalSource;
}
+function getExampleBaseHref(path) {
+ return new URL('./', new URL(path, location.href)).href;
+}
+
+function withBaseHref(html, baseHref) {
+ if (/