Skip to content

fix(css): enforce LTR direction for inline code elements in admin #72

fix(css): enforce LTR direction for inline code elements in admin

fix(css): enforce LTR direction for inline code elements in admin #72

Workflow file for this run

name: Release Common
on:
push:
tags:
- '*'
- '!*alpha*'
- '!*beta*'
permissions:
contents: write
jobs:
release:
name: Package and Release
runs-on: ubuntu-latest
outputs:
repo: ${{ github.repository }}
zip: ${{ steps.vars.outputs.zip }}
version: ${{ steps.vars.outputs.tag }}
steps:
- name: 1️⃣ Checkout code
uses: actions/checkout@v4
- name: 2️⃣ Set up variables
id: vars
shell: bash
run: |
TAG="${GITHUB_REF#refs/tags/}"
ZIP="common-${TAG}.zip"
echo "tag=$TAG" >> $GITHUB_OUTPUT
echo "zip=$ZIP" >> $GITHUB_OUTPUT
- name: 3️⃣ Prepare ZIP contents
shell: bash
run: |
STAGE=".release-common"
rm -rf "$STAGE"
mkdir "$STAGE"
cp -r css fonts img js index.html version "$STAGE/"
- name: 4️⃣ Create ZIP archive
shell: bash
run: |
cd .release-common
zip -r "../${{ steps.vars.outputs.zip }}" .
- name: 5️⃣ Create GitHub Release and upload ZIP
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.vars.outputs.tag }}
files: ${{ steps.vars.outputs.zip }}
post-release:
name: Upload Common ZIP to FTP
needs: release
runs-on: ubuntu-latest
steps:
- name: 1️⃣ Download release ZIP
shell: bash
run: |
REPO="${{ needs.release.outputs.repo }}"
API_URL="https://api.github.com/repos/$REPO/releases/latest"
echo "🔍 Fetching release info..."
curl -s -H "Authorization: token ${{ secrets.CSK_PAT }}" "$API_URL" > release.json
ZIP_URL=$(jq -r '.assets[] | select(.name | endswith(".zip")) | .browser_download_url' release.json)
if [ -z "$ZIP_URL" ] || [ "$ZIP_URL" = "null" ]; then
echo "❌ No ZIP asset found"
exit 1
fi
curl -L -o common.zip "$ZIP_URL"
- name: 2️⃣ Upload common.zip to FTP
uses: SamKirkland/FTP-Deploy-Action@4.3.3
with:
server: ${{ secrets.FTP_HOST }}
port: ${{ secrets.FTP_PORT }}
username: ${{ secrets.FTP_USER }}
password: ${{ secrets.FTP_PASS }}
local-dir: ./
server-dir: ${{ secrets.FTP_PATH }}
state-name: ".sync-common-state.json"
exclude: |
**/*
!common.zip
- name: 3️⃣ Send JSON-RPC
shell: bash
env:
RPC_URL: ${{ secrets.RPC_URL }}
RPC_KEY: ${{ secrets.RPC_KEY }}
RPC_VER: ${{ secrets.RPC_VER }}
run: |
REPO="${{ needs.release.outputs.repo }}"
VERSION="${{ needs.release.outputs.version }}"
REPO_URL="https://github.com/$REPO"
OWNER="${REPO%%/*}"
NAME="${REPO##*/}"
ID=$(openssl rand -hex 8)
curl -s -X POST "$RPC_URL" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $RPC_KEY" \
-d "{
\"jsonrpc\": \"$RPC_VER\",
\"method\": \"update\",
\"params\": {
\"type\": \"common\",
\"package\": \"common\",
\"repo\": \"$REPO_URL\",
\"owner\": \"$OWNER\",
\"name\": \"$NAME\",
\"version\": \"$VERSION\"
},
\"id\": \"$ID\"
}"