Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/check_format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Format
on: [pull_request]

jobs:
check-format-typescript:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda
with:
run_install: false
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
cache-dependency-path: ./typescript
- name: Ensure formatting
working-directory: ./typescript
run: |
pnpm install --frozen-lockfile
pnpm format:check
22 changes: 22 additions & 0 deletions .github/workflows/check_lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Lint
on: [pull_request]

jobs:
check-lint-typescript:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda
with:
run_install: false
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
cache-dependency-path: ./typescript
- name: Ensure Linting
working-directory: ./typescript
run: |
pnpm install --frozen-lockfile
pnpm lint:check
29 changes: 29 additions & 0 deletions .github/workflows/check_package_lock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Package Lock
on: [pull_request]

jobs:
check-package-lock-typescript:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda
with:
run_install: false

- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
cache-dependency-path: ./typescript

- name: Check if pnpm-lock.yaml changed
working-directory: ./typescript
run: |
pnpm install
if [ -n "$(git diff pnpm-lock.yaml)" ]; then
echo "Error: pnpm-lock.yaml was modified after running pnpm install. Please commit the updated pnpm-lock.yaml file."
git diff pnpm-lock.yaml
exit 1
fi
6 changes: 3 additions & 3 deletions .github/workflows/check_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: uv sync --all-extras --dev

- name: Run Tests
run: uv run python -m pytest
run: uv run pytest

lint-python:
runs-on: ubuntu-latest
Expand All @@ -39,8 +39,8 @@ jobs:
enable-cache: true
cache-dependency-glob: "python/x402/uv.lock"

- name: Lint with ruff
- name: Lint
run: uvx ruff check

- name: Format check with ruff
- name: Check formatting
run: uvx ruff format --check
77 changes: 0 additions & 77 deletions .github/workflows/check_typescript.yml

This file was deleted.

54 changes: 54 additions & 0 deletions .github/workflows/publish_npm_x402_aptos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Publish @bankofai/x402-aptos package to NPM

on:
workflow_dispatch:

jobs:
publish-npm-x402-aptos:
runs-on: ubuntu-latest
environment: ${{ github.ref == 'refs/heads/main' && 'npm' || '' }}
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061
with:
version: 10.7.0

- uses: actions/setup-node@v4
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
cache: "pnpm"
cache-dependency-path: ./typescript

- name: Update npm for OIDC trusted publishing
run: npm install -g npm@latest

- name: Configure npm for trusted publishing
run: npm config delete always-auth 2>/dev/null || true

- name: Install and build
working-directory: ./typescript
run: |
pnpm install --frozen-lockfile
pnpm -r --filter=@bankofai/x402-core --filter=@bankofai/x402-aptos run build

- name: Publish @bankofai/x402-aptos package
working-directory: ./typescript/packages/mechanisms/aptos
run: |
PACKAGE_NAME=$(node -p "require('./package.json').name")
PACKAGE_VERSION=$(node -p "require('./package.json').version")

echo "Package: $PACKAGE_NAME@$PACKAGE_VERSION"

if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
echo "Publishing to NPM (main branch)"
pnpm publish --provenance --access public
else
echo "Dry run only (non-main branch: ${{ github.ref }})"
pnpm publish --dry-run --no-git-checks
fi
54 changes: 54 additions & 0 deletions .github/workflows/publish_npm_x402_axios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Publish @bankofai/x402-axios package to NPM

on:
workflow_dispatch:

jobs:
publish-npm-x402-axios:
runs-on: ubuntu-latest
environment: ${{ github.ref == 'refs/heads/main' && 'npm' || '' }}
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061
with:
version: 10.7.0

- uses: actions/setup-node@v4
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
cache: "pnpm"
cache-dependency-path: ./typescript

- name: Update npm for OIDC trusted publishing
run: npm install -g npm@latest

- name: Configure npm for trusted publishing
run: npm config delete always-auth 2>/dev/null || true

- name: Install and build
working-directory: ./typescript
run: |
pnpm install --frozen-lockfile
pnpm -r --filter=@bankofai/x402-core --filter=@bankofai/x402-axios run build

- name: Publish @bankofai/x402-axios package
working-directory: ./typescript/packages/http/axios
run: |
PACKAGE_NAME=$(node -p "require('./package.json').name")
PACKAGE_VERSION=$(node -p "require('./package.json').version")

echo "Package: $PACKAGE_NAME@$PACKAGE_VERSION"

if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
echo "Publishing to NPM (main branch)"
pnpm publish --provenance --access public
else
echo "Dry run only (non-main branch: ${{ github.ref }})"
pnpm publish --dry-run --no-git-checks
fi
54 changes: 54 additions & 0 deletions .github/workflows/publish_npm_x402_core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Publish @bankofai/x402-core package to NPM

on:
workflow_dispatch:

jobs:
publish-npm-x402-core:
runs-on: ubuntu-latest
environment: ${{ github.ref == 'refs/heads/main' && 'npm' || '' }}
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061
with:
version: 10.7.0

- uses: actions/setup-node@v4
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
cache: "pnpm"
cache-dependency-path: ./typescript

- name: Update npm for OIDC trusted publishing
run: npm install -g npm@latest

- name: Configure npm for trusted publishing
run: npm config delete always-auth 2>/dev/null || true

- name: Install and build
working-directory: ./typescript
run: |
pnpm install --frozen-lockfile
pnpm -r --filter=@bankofai/x402-core run build

- name: Publish @bankofai/x402-core package
working-directory: ./typescript/packages/core
run: |
PACKAGE_NAME=$(node -p "require('./package.json').name")
PACKAGE_VERSION=$(node -p "require('./package.json').version")

echo "Package: $PACKAGE_NAME@$PACKAGE_VERSION"

if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
echo "Publishing to NPM (main branch)"
pnpm publish --provenance --access public
else
echo "Dry run only (non-main branch: ${{ github.ref }})"
pnpm publish --dry-run --no-git-checks
fi
54 changes: 54 additions & 0 deletions .github/workflows/publish_npm_x402_evm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Publish @bankofai/x402-evm package to NPM

on:
workflow_dispatch:

jobs:
publish-npm-x402-evm:
runs-on: ubuntu-latest
environment: ${{ github.ref == 'refs/heads/main' && 'npm' || '' }}
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061
with:
version: 10.7.0

- uses: actions/setup-node@v4
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
cache: "pnpm"
cache-dependency-path: ./typescript

- name: Update npm for OIDC trusted publishing
run: npm install -g npm@latest

- name: Configure npm for trusted publishing
run: npm config delete always-auth 2>/dev/null || true

- name: Install and build
working-directory: ./typescript
run: |
pnpm install --frozen-lockfile
pnpm -r --filter=@bankofai/x402-core --filter=@bankofai/x402-extensions --filter=@bankofai/x402-evm run build

- name: Publish @bankofai/x402-evm package
working-directory: ./typescript/packages/mechanisms/evm
run: |
PACKAGE_NAME=$(node -p "require('./package.json').name")
PACKAGE_VERSION=$(node -p "require('./package.json').version")

echo "Package: $PACKAGE_NAME@$PACKAGE_VERSION"

if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
echo "Publishing to NPM (main branch)"
pnpm publish --provenance --access public
else
echo "Dry run only (non-main branch: ${{ github.ref }})"
pnpm publish --dry-run --no-git-checks
fi
Loading