From 62912e65e4fad16dc89614c2387baad6ed8567b6 Mon Sep 17 00:00:00 2001 From: Dargon789 <64915515+Dargon789@users.noreply.github.com> Date: Mon, 19 Jan 2026 09:50:49 +0700 Subject: [PATCH] Delete .github/workflows/publish-dists.yml Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> --- .github/workflows/publish-dists.yml | 91 ----------------------------- 1 file changed, 91 deletions(-) delete mode 100644 .github/workflows/publish-dists.yml diff --git a/.github/workflows/publish-dists.yml b/.github/workflows/publish-dists.yml deleted file mode 100644 index b8fd53b96..000000000 --- a/.github/workflows/publish-dists.yml +++ /dev/null @@ -1,91 +0,0 @@ -name: Publish Dists for Packages - -permissions: - contents: write - -on: - workflow_dispatch: - push: - branches: - - master - -jobs: - build-and-push: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - uses: ./.github/actions/install-dependencies - - - name: Build package - run: pnpm run build - - - name: Prepare dist branch - run: | - PACKAGES=("services/guard" "services/identity-instrument" "services/relayer" "wallet/core" "wallet/primitives" "wallet/wdk" "wallet/dapp-client") - - for PACKAGE in "${PACKAGES[@]}"; do - BRANCH="dists/$PACKAGE" - PKG_DIR="packages/$PACKAGE" - - echo "📦 Publishing $PACKAGE to $BRANCH" - - mkdir -p /tmp/$PACKAGE - shopt -s dotglob - cp -r $PKG_DIR/* /tmp/$PACKAGE || true - - cd /tmp/$PACKAGE - git init - git checkout -b $BRANCH - - git config user.name "github-actions" - git config user.email "actions@github.com" - - echo "🔧 Rewriting workspace: deps in package.json..." - node -e ' - const fs = require("fs"); - const path = require("path"); - const pkgPath = path.resolve("package.json"); - const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8")); - const repo = "github:0xsequence/sequence.js"; - - const versions = { - "@0xsequence/guard": `${repo}#dists/services/guard`, - "@0xsequence/identity-instrument": `${repo}#dists/services/identity-instrument`, - "@0xsequence/relayer": `${repo}#dists/services/relayer`, - "@0xsequence/wallet-core": `${repo}#dists/wallet/core`, - "@0xsequence/wallet-primitives": `${repo}#dists/wallet/primitives`, - "@0xsequence/wallet-wdk": `${repo}#dists/wallet/wdk`, - }; - - const rewrite = (deps = {}) => { - for (const k in deps) { - if (deps[k].startsWith("workspace:")) { - const version = versions[k]; - - if (!version) { - console.warn(`No version found for ${k}, skipping...`); - continue; - } - - deps[k] = version; - console.log(`→ ${k} → ${deps[k]}`); - } - } - }; - - rewrite(pkg.dependencies); - fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2)); - ' - - git add . - git commit -m "Build: publish $PACKAGE dist" - - git remote add origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git - git push -f origin HEAD:$BRANCH - - cd - - done