Skip to content

Commit

Permalink
init package
Browse files Browse the repository at this point in the history
  • Loading branch information
jinglescode committed Nov 27, 2024
1 parent ac0f8c4 commit b6b7804
Show file tree
Hide file tree
Showing 32 changed files with 3,349 additions and 443 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
core-cst-version-updated: ${{ steps.compare-versions.outputs.core-cst-version-updated }}
provider-version-updated: ${{ steps.compare-versions.outputs.provider-version-updated }}
react-version-updated: ${{ steps.compare-versions.outputs.react-version-updated }}
svelte-version-updated: ${{ steps.compare-versions.outputs.svelte-version-updated }}
transaction-version-updated: ${{ steps.compare-versions.outputs.transaction-version-updated }}
wallet-version-updated: ${{ steps.compare-versions.outputs.wallet-version-updated }}
cli-version-updated: ${{ steps.compare-versions.outputs.cli-version-updated }}
Expand All @@ -57,6 +58,7 @@ jobs:
CORE_CST_PRE_MERGE_VERSION=$(node -p "require('./packages/mesh-core-cst/package.json').version")
PROVIDER_PRE_MERGE_VERSION=$(node -p "require('./packages/mesh-core-cst/package.json').version")
REACT_PRE_MERGE_VERSION=$(node -p "require('./packages/mesh-react/package.json').version")
SVELTE_PRE_MERGE_VERSION=$(node -p "require('./packages/mesh-svelte/package.json').version")
TRANSACTION_PRE_MERGE_VERSION=$(node -p "require('./packages/mesh-transaction/package.json').version")
WALLET_PRE_MERGE_VERSION=$(node -p "require('./packages/mesh-wallet/package.json').version")
CLI_PRE_MERGE_VERSION=$(node -p "require('./scripts/mesh-cli/package.json').version")
Expand All @@ -67,6 +69,7 @@ jobs:
echo "core_cst_pre_merge_version=$CORE_CST_PRE_MERGE_VERSION" >> "$GITHUB_OUTPUT"
echo "provider_pre_merge_version=$PROVIDER_PRE_MERGE_VERSION" >> "$GITHUB_OUTPUT"
echo "react_pre_merge_version=$REACT_PRE_MERGE_VERSION" >> "$GITHUB_OUTPUT"
echo "svelte_pre_merge_version=$SVELTE_PRE_MERGE_VERSION" >> "$GITHUB_OUTPUT"
echo "transaction_pre_merge_version=$TRANSACTION_PRE_MERGE_VERSION" >> "$GITHUB_OUTPUT"
echo "wallet_pre_merge_version=$WALLET_PRE_MERGE_VERSION" >> "$GITHUB_OUTPUT"
echo "cli_pre_merge_version=$CLI_PRE_MERGE_VERSION" >> "$GITHUB_OUTPUT"
Expand All @@ -86,6 +89,7 @@ jobs:
CORE_CST_POST_MERGE_VERSION=$(node -p "require('./packages/mesh-core-cst/package.json').version")
PROVIDER_POST_MERGE_VERSION=$(node -p "require('./packages/mesh-core-cst/package.json').version")
REACT_POST_MERGE_VERSION=$(node -p "require('./packages/mesh-react/package.json').version")
SVELTE_POST_MERGE_VERSION=$(node -p "require('./packages/mesh-svelte/package.json').version")
TRANSACTION_POST_MERGE_VERSION=$(node -p "require('./packages/mesh-transaction/package.json').version")
WALLET_POST_MERGE_VERSION=$(node -p "require('./packages/mesh-wallet/package.json').version")
CLI_POST_MERGE_VERSION=$(node -p "require('./scripts/mesh-cli/package.json').version")
Expand All @@ -96,6 +100,7 @@ jobs:
echo "core_cst_post_merge_version=$CORE_CST_POST_MERGE_VERSION" >> "$GITHUB_OUTPUT"
echo "provider_post_merge_version=$PROVIDER_POST_MERGE_VERSION" >> "$GITHUB_OUTPUT"
echo "react_post_merge_version=$REACT_POST_MERGE_VERSION" >> "$GITHUB_OUTPUT"
echo "svelte_post_merge_version=$SVELTE_POST_MERGE_VERSION" >> "$GITHUB_OUTPUT"
echo "transaction_post_merge_version=$TRANSACTION_POST_MERGE_VERSION" >> "$GITHUB_OUTPUT"
echo "wallet_post_merge_version=$WALLET_POST_MERGE_VERSION" >> "$GITHUB_OUTPUT"
echo "cli_post_merge_version=$CLI_POST_MERGE_VERSION" >> "$GITHUB_OUTPUT"
Expand Down Expand Up @@ -138,6 +143,11 @@ jobs:
else
echo "react-version-updated=false" >> "$GITHUB_OUTPUT"
fi
if [[ "${{ steps.pre-merge-version.outputs.svelte_pre_merge_version }}" != "${{ steps.post-merge-version.outputs.svelte_post_merge_version }}" ]]; then
echo "svelte-version-updated=true" >> "$GITHUB_OUTPUT"
else
echo "svelte-version-updated=false" >> "$GITHUB_OUTPUT"
fi
if [[ "${{ steps.pre-merge-version.outputs.transaction_pre_merge_version }}" != "${{ steps.post-merge-version.outputs.transaction_post_merge_version }}" ]]; then
echo "transaction-version-updated=true" >> "$GITHUB_OUTPUT"
else
Expand Down Expand Up @@ -259,6 +269,21 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

publish-meshsdk-svelte:
needs: [build, check-version]
if: needs.check-version.outputs.svelte-version-updated == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- run: npm install && npm run build
- run: cd packages/mesh-svelte && npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

publish-meshsdk-transaction:
needs: [build, check-version]
if: needs.check-version.outputs.transaction-version-updated == 'true'
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ out/
build
dist


# Debug
npm-debug.log*
yarn-debug.log*
Expand All @@ -46,3 +45,6 @@ apps/docs/src/data/mesh-providers.json
apps/docs/src/data/mesh-react.json
apps/docs/src/data/mesh-transactions.json
apps/docs/src/data/mesh-wallets.json

# svelte
.svelte-kit/
Loading

0 comments on commit b6b7804

Please sign in to comment.