From e8e167eb7664a10d1f92216a55d4adf21e12f799 Mon Sep 17 00:00:00 2001 From: Dmitry Chepurovskiy Date: Tue, 25 Nov 2025 16:26:42 +0200 Subject: [PATCH 01/39] ITSM-1219: Implement pipelines for publishing libs --- .github/workflows/publish.yml | 227 +++++++++++++---------------- .github/workflows/release.yml | 94 +++++------- .github/workflows/test-publish.yml | 72 --------- nx.json | 16 +- typescript/README.md | 14 +- 5 files changed, 163 insertions(+), 260 deletions(-) delete mode 100644 .github/workflows/test-publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7a86483..e242365 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,122 +1,105 @@ -name: Publish package - -on: - push: - tags: - - 'aqua-v*.*.*' - - 'cross-chain-v*.*.*' - - 'fusion-v*.*.*' - - 'limit-order-v*.*.*' - - 'swap-vm-v*.*.*' - # Temp: triggers for testing new pipelines in PR: https://github.com/1inch/sdks/pull/23 - - '*/v*.*.*' - workflow_dispatch: - inputs: - tag: - type: string - description: Tag to publish (e.g. aqua/v1.2.3) - required: true - dry_run: - type: boolean - description: Dry run (preview publish commands) - required: false - default: false - -jobs: - determine-sdk: - runs-on: ubuntu-latest - outputs: - sdk: ${{ steps.determine-sdk.outputs.sdk }} - sdk_path: ${{ steps.determine-sdk.outputs.sdk_path }} - steps: - - name: Determine SDK from tag - id: determine-sdk - run: | - TAG=${GITHUB_REF_NAME} - if [[ "$TAG" == aqua-v* ]]; then - echo "sdk=aqua" >> "$GITHUB_OUTPUT" - echo "sdk_path=typescript/aqua" >> "$GITHUB_OUTPUT" - elif [[ "$TAG" == cross-chain-v* ]]; then - echo "sdk=cross-chain" >> "$GITHUB_OUTPUT" - echo "sdk_path=typescript/cross-chain" >> "$GITHUB_OUTPUT" - elif [[ "$TAG" == fusion-v* ]]; then - echo "sdk=fusion" >> "$GITHUB_OUTPUT" - echo "sdk_path=typescript/fusion" >> "$GITHUB_OUTPUT" - elif [[ "$TAG" == limit-order-v* ]]; then - echo "sdk=limit-order" >> "$GITHUB_OUTPUT" - echo "sdk_path=typescript/limit-order" >> "$GITHUB_OUTPUT" - elif [[ "$TAG" == swap-vm-v* ]]; then - echo "sdk=swap-vm" >> "$GITHUB_OUTPUT" - echo "sdk_path=typescript/swap-vm" >> "$GITHUB_OUTPUT" - else - echo "Unknown tag pattern: $TAG" >&2 - exit 1 - fi - - publish-to-npm: - needs: determine-sdk - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install pnpm - uses: pnpm/action-setup@v4 - - - uses: actions/setup-node@v4 - with: - node-version: 22 - registry-url: 'https://registry.npmjs.org' - scope: '@1inch' - cache: pnpm - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - - name: Build SDK - run: pnpm nx build ${{ needs.determine-sdk.outputs.sdk }} - - - name: Publish ๐Ÿš€ - run: | - VERSION=$(node -p "require('../package.json').version") - if [[ "$VERSION" == *"-rc"* ]]; then - pnpm publish --no-git-checks --access=public --tag next - else - pnpm publish --no-git-checks --access=public - fi - working-directory: ${{ needs.determine-sdk.outputs.sdk_path }}/dist - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} - - publish-to-github: - needs: determine-sdk - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install pnpm - uses: pnpm/action-setup@v4 - - - uses: actions/setup-node@v4 - with: - node-version: 22 - cache: pnpm - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - - name: Build SDK - run: pnpm nx build ${{ needs.determine-sdk.outputs.sdk }} - - - name: Auth in GitHub private registry npm - run: | - echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > .npmrc - echo "@1inch:registry=https://npm.pkg.github.com" >> .npmrc - - - name: Publish ๐Ÿš€ - run: pnpm publish --no-git-checks - working-directory: ${{ needs.determine-sdk.outputs.sdk_path }}/dist \ No newline at end of file +# name: Publish + +# on: +# push: +# tags: +# - '*/v*.*.*' +# workflow_dispatch: +# inputs: +# tag: +# type: string +# description: Tag to publish (e.g. aqua/v1.2.3) +# required: true + +# permissions: +# contents: read +# packages: write + +# jobs: +# determine: +# runs-on: ubuntu-latest +# outputs: +# tag: ${{ steps.tag.outputs.value }} +# project: ${{ steps.project.outputs.value }} +# sdk_path: ${{ steps.project.outputs.sdk_path }} +# steps: +# - id: tag +# run: | +# if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then +# echo "value=${{ inputs.tag }}" >> "$GITHUB_OUTPUT" +# else +# echo "value=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT" +# fi + +# - id: project +# run: | +# TAG="${{ steps.tag.outputs.value }}" + +# case "$TAG" in +# aqua/v*) PROJECT="aqua" ;; +# sdk-core/v*) PROJECT="sdk-core" ;; +# swap-vm/v*) PROJECT="swap-vm" ;; +# *) +# echo "Unknown tag pattern: $TAG" +# exit 1 +# ;; +# esac + +# echo "value=$PROJECT" >> "$GITHUB_OUTPUT" +# echo "sdk_path=typescript/$PROJECT" >> "$GITHUB_OUTPUT" + +# publish: +# needs: determine +# runs-on: ubuntu-latest +# permissions: +# contents: read +# packages: write +# steps: +# - name: Checkout +# uses: actions/checkout@v4 +# with: +# ref: ${{ needs.determine.outputs.tag }} +# fetch-depth: 0 + +# - name: Install pnpm +# uses: pnpm/action-setup@v4 + +# - name: Setup Node +# uses: actions/setup-node@v4 +# with: +# node-version: 22 +# cache: pnpm +# registry-url: https://registry.npmjs.org +# always-auth: true + +# - name: Install dependencies +# run: pnpm install --frozen-lockfile + +# - name: Build +# run: npx nx build ${{ needs.determine.outputs.project }} + +# - name: Publish to npmjs +# env: +# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} +# run: | +# SDK_PATH=${{ needs.determine.outputs.sdk_path }} +# cd "$SDK_PATH/dist" + +# TAG_ARG="" +# VERSION=$(node -p "require('../package.json').version") +# if [[ "$VERSION" == *"-rc"* ]]; then +# TAG_ARG="--tag next" +# fi + +# npm publish --access public $TAG_ARG + +# - name: Publish to GitHub Packages +# env: +# NODE_AUTH_TOKEN: ${{ github.token }} +# run: | +# SDK_PATH=${{ needs.determine.outputs.sdk_path }} +# cd "$SDK_PATH/dist" + +# npm config set @1inch:registry https://npm.pkg.github.com +# npm config set //npm.pkg.github.com/:_authToken "${NODE_AUTH_TOKEN}" +# npm publish --access public diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 233eca7..36b5691 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,37 +1,41 @@ -name: Release new version +name: Release on: workflow_dispatch: inputs: - sdk: + project: type: choice - description: SDK to release + description: Library to release required: true options: - aqua - - cross-chain - - fusion - - limit-order + - sdk-core - swap-vm - version: + bump: type: choice - description: Version bump type + description: Semver bump or custom required: true options: - patch - minor - major - prerelease + dry_run: + type: boolean + description: Preview only + required: false + default: false + +permissions: + contents: write + packages: write + actions: write jobs: release: runs-on: ubuntu-latest - permissions: - contents: write - packages: write - actions: write steps: - - name: Checkout + - name: Checkout master uses: actions/checkout@v4 with: fetch-depth: 0 @@ -45,55 +49,33 @@ jobs: with: node-version: 22 cache: pnpm + registry-url: https://registry.npmjs.org - - name: Install Dev Dependencies - run: pnpm install -D + - name: Install dependencies + run: pnpm install --frozen-lockfile - - name: Get SDK info - id: sdk_info + - name: Configure git run: | - SDK_PATH="typescript/${{ github.event.inputs.sdk }}" - echo "SDK_PATH=$SDK_PATH" >> "$GITHUB_OUTPUT" - cd $SDK_PATH - echo "OLD_VERSION=$(pnpm pkg get version | tr -d '"')" >> "$GITHUB_OUTPUT" + git config --global user.email "ci_cd_bot@1inch.io" + git config --global user.name "CI/CD Bot" + env: + GITHUB_TOKEN: ${{ github.token }} - - name: Bump package.json version + - name: Run Nx release version id: version - run: | - cd ${{ steps.sdk_info.outputs.SDK_PATH }} - pnpm version ${{ github.event.inputs.version }} --preid rc --git-tag-version=false - echo "NEW_VERSION=$(pnpm pkg get version | tr -d '"')" >> "$GITHUB_OUTPUT" - - - name: Generate changelog - run: | - cd ${{ steps.sdk_info.outputs.SDK_PATH }} - # Try to generate changelog from the last tag for this SDK - LAST_TAG="${{ github.event.inputs.sdk }}-v${{ steps.sdk_info.outputs.OLD_VERSION }}" - pnpm changelog:generate -t $LAST_TAG || pnpm changelog:generate - - - name: Create github release env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ github.token }} run: | - git config --global user.email ci_cd_bot@1inch.io - git config --global user.name "CI/CD Bot" - - cd ${{ steps.sdk_info.outputs.SDK_PATH }} - git add package.json - git commit -m "version @1inch/${{ github.event.inputs.sdk }}-sdk v${{ steps.version.outputs.NEW_VERSION }}" - - TAG_NAME="${{ github.event.inputs.sdk }}-v${{ steps.version.outputs.NEW_VERSION }}" - git tag $TAG_NAME - git push - git push --tags - - if [ -f CHANGELOG.md ]; then - gh release create $TAG_NAME --notes-file CHANGELOG.md --title "@1inch/${{ github.event.inputs.sdk }}-sdk v${{ steps.version.outputs.NEW_VERSION }}" - else - gh release create $TAG_NAME --generate-notes --title "@1inch/${{ github.event.inputs.sdk }}-sdk v${{ steps.version.outputs.NEW_VERSION }}" + SPECIFIER="${{ inputs.bump }}" + + DRY_RUN_FLAG="" + if [ "${{ inputs.dry_run }}" = "true" ]; then + DRY_RUN_FLAG="--dry-run" fi - - name: Trigger publish - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: gh workflow run publish.yml -r ${{ github.event.inputs.sdk }}-v${{ steps.version.outputs.NEW_VERSION }} \ No newline at end of file + npx nx release version "$SPECIFIER" --projects="${{ inputs.project }}" $DRY_RUN_FLAG --verbose + + echo "version=$(node -p \"require('./typescript/${{ inputs.project }}/package.json').version\")" >> "$GITHUB_OUTPUT" + + - name: Show next version + run: echo "Version = ${{ steps.version.outputs.version }}" diff --git a/.github/workflows/test-publish.yml b/.github/workflows/test-publish.yml deleted file mode 100644 index d23c754..0000000 --- a/.github/workflows/test-publish.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: Test Publish (Dry Run) - -on: - workflow_dispatch: - inputs: - sdk: - type: choice - description: SDK to test publish - required: true - options: - - aqua - - cross-chain - - fusion - - limit-order - - swap-vm - dry_run: - type: boolean - description: 'Dry run (do not actually publish)' - required: false - default: true - -jobs: - test-publish: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install pnpm - uses: pnpm/action-setup@v4 - - - uses: actions/setup-node@v4 - with: - node-version: 22 - registry-url: 'https://registry.npmjs.org' - scope: '@1inch' - cache: pnpm - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - - name: Build SDK - run: pnpm nx build ${{ github.event.inputs.sdk }} - - - name: Check build output - run: | - echo "๐Ÿ“ฆ Checking build output for ${{ github.event.inputs.sdk }}" - ls -la typescript/${{ github.event.inputs.sdk }}/dist/ - - echo "" - echo "๐Ÿ“‹ Package.json contents:" - cat typescript/${{ github.event.inputs.sdk }}/dist/package.json | head -20 - - echo "" - echo "๐Ÿ“ Build structure:" - find typescript/${{ github.event.inputs.sdk }}/dist -type f -name "*.js" | head -10 - - - name: Dry Run - Publish Test - if: ${{ github.event.inputs.dry_run == 'true' }} - run: | - cd typescript/${{ github.event.inputs.sdk }} - echo "๐Ÿงช DRY RUN: Would publish the following package:" - npm pack dist --dry-run - echo "" - echo "โœ… Dry run complete - no packages were published" - - - name: Real Publish (Manual Approval Required) - if: ${{ github.event.inputs.dry_run == 'false' }} - run: | - echo "โš ๏ธ Real publish requested - this would publish to NPM" - echo "This workflow is for testing only - use the release workflow for real publishing" - exit 1 \ No newline at end of file diff --git a/nx.json b/nx.json index b8dfb7b..a4ca65e 100644 --- a/nx.json +++ b/nx.json @@ -81,6 +81,17 @@ }, "automaticFromRef": true }, + "version": { + "git": { + "commit": true, + "commitMessage": "chore(release): {version}", + "tag": true, + "push": true, + "stageChanges": true + }, + "updateDependents": "never", + "logUnchangedProjects": true + }, "groups": { "typescript": { "projects": ["typescript/*"], @@ -88,10 +99,7 @@ } }, "releaseTag": { - "pattern": "{projectName}/{version}" - }, - "git": { - "commitMessage": "chore(release): {version}" + "pattern": "{projectName}/v{version}" } } } diff --git a/typescript/README.md b/typescript/README.md index 466e9a8..d98e5bb 100644 --- a/typescript/README.md +++ b/typescript/README.md @@ -81,14 +81,16 @@ pnpm lint:types ### Release Process 1. **Create a new release:** - - Go to GitHub Actions โ†’ "Release new version" - - Select the SDK to release - - Choose version bump type (patch, minor, major, prerelease) + - Go to GitHub Actions โ†’ "Release" + - Pick the SDK to release + - Choose the bump (patch, minor, major, prerelease, or custom version) + - Releases run on `master` and refuse to proceed if local `master` is behind `origin/master` + - Dependents are not auto-bumped (NX `updateDependents=never`) 2. **Automatic publishing:** - - The release workflow creates a version tag (e.g., `aqua/v1.0.0`) - - This triggers the publish workflow automatically - - The SDK is published to public NPM registry + - The release workflow commits + tags (e.g., `aqua/v1.0.0`) + - Tag push triggers the publish workflow + - Publish workflow builds and publishes to npmjs and GitHub Packages (`next` tag is used for `-rc` prereleases) ### Version Tags From 90961807d354a5297285145c65000f5ff71f71c5 Mon Sep 17 00:00:00 2001 From: Dmitry Chepurovskiy Date: Tue, 25 Nov 2025 16:32:08 +0200 Subject: [PATCH 02/39] ITSM-1219: WIP --- .github/workflows/release.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 36b5691..255b8f1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ on: - prerelease dry_run: type: boolean - description: Preview only + description: Dry Run required: false default: false @@ -75,7 +75,8 @@ jobs: npx nx release version "$SPECIFIER" --projects="${{ inputs.project }}" $DRY_RUN_FLAG --verbose - echo "version=$(node -p \"require('./typescript/${{ inputs.project }}/package.json').version\")" >> "$GITHUB_OUTPUT" + VERSION=$(node -p "require('./typescript/${{ inputs.project }}/package.json').version") + echo "version=$VERSION" >> "$GITHUB_OUTPUT" - name: Show next version run: echo "Version = ${{ steps.version.outputs.version }}" From cb7caf9f07641cde94b3a6c64e7bfb113cb4c81b Mon Sep 17 00:00:00 2001 From: Dmitry Chepurovskiy Date: Tue, 25 Nov 2025 16:38:14 +0200 Subject: [PATCH 03/39] ITSM-1219: WIP --- .github/workflows/release.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 255b8f1..cb3b5df 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,6 +20,11 @@ on: - minor - major - prerelease + preid: + type: string + description: Prerelease identifier (used when bump = prerelease) + required: false + default: rc dry_run: type: boolean description: Dry Run @@ -78,5 +83,5 @@ jobs: VERSION=$(node -p "require('./typescript/${{ inputs.project }}/package.json').version") echo "version=$VERSION" >> "$GITHUB_OUTPUT" - - name: Show next version + - name: Show next version (not updated in case of dry run) run: echo "Version = ${{ steps.version.outputs.version }}" From 4ac9009fdc7b4a3c34c6775693e392ba39325766 Mon Sep 17 00:00:00 2001 From: Dmitry Chepurovskiy Date: Tue, 25 Nov 2025 16:40:52 +0200 Subject: [PATCH 04/39] ITSM-1219: WIP --- .github/workflows/publish.yml | 232 +++++++++++++++++++--------------- .github/workflows/release.yml | 11 +- 2 files changed, 136 insertions(+), 107 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e242365..f7c43be 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,105 +1,127 @@ -# name: Publish - -# on: -# push: -# tags: -# - '*/v*.*.*' -# workflow_dispatch: -# inputs: -# tag: -# type: string -# description: Tag to publish (e.g. aqua/v1.2.3) -# required: true - -# permissions: -# contents: read -# packages: write - -# jobs: -# determine: -# runs-on: ubuntu-latest -# outputs: -# tag: ${{ steps.tag.outputs.value }} -# project: ${{ steps.project.outputs.value }} -# sdk_path: ${{ steps.project.outputs.sdk_path }} -# steps: -# - id: tag -# run: | -# if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then -# echo "value=${{ inputs.tag }}" >> "$GITHUB_OUTPUT" -# else -# echo "value=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT" -# fi - -# - id: project -# run: | -# TAG="${{ steps.tag.outputs.value }}" - -# case "$TAG" in -# aqua/v*) PROJECT="aqua" ;; -# sdk-core/v*) PROJECT="sdk-core" ;; -# swap-vm/v*) PROJECT="swap-vm" ;; -# *) -# echo "Unknown tag pattern: $TAG" -# exit 1 -# ;; -# esac - -# echo "value=$PROJECT" >> "$GITHUB_OUTPUT" -# echo "sdk_path=typescript/$PROJECT" >> "$GITHUB_OUTPUT" - -# publish: -# needs: determine -# runs-on: ubuntu-latest -# permissions: -# contents: read -# packages: write -# steps: -# - name: Checkout -# uses: actions/checkout@v4 -# with: -# ref: ${{ needs.determine.outputs.tag }} -# fetch-depth: 0 - -# - name: Install pnpm -# uses: pnpm/action-setup@v4 - -# - name: Setup Node -# uses: actions/setup-node@v4 -# with: -# node-version: 22 -# cache: pnpm -# registry-url: https://registry.npmjs.org -# always-auth: true - -# - name: Install dependencies -# run: pnpm install --frozen-lockfile - -# - name: Build -# run: npx nx build ${{ needs.determine.outputs.project }} - -# - name: Publish to npmjs -# env: -# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} -# run: | -# SDK_PATH=${{ needs.determine.outputs.sdk_path }} -# cd "$SDK_PATH/dist" - -# TAG_ARG="" -# VERSION=$(node -p "require('../package.json').version") -# if [[ "$VERSION" == *"-rc"* ]]; then -# TAG_ARG="--tag next" -# fi - -# npm publish --access public $TAG_ARG - -# - name: Publish to GitHub Packages -# env: -# NODE_AUTH_TOKEN: ${{ github.token }} -# run: | -# SDK_PATH=${{ needs.determine.outputs.sdk_path }} -# cd "$SDK_PATH/dist" - -# npm config set @1inch:registry https://npm.pkg.github.com -# npm config set //npm.pkg.github.com/:_authToken "${NODE_AUTH_TOKEN}" -# npm publish --access public +name: Publish + +on: + push: + tags: + - '*/v*.*.*' + workflow_dispatch: + inputs: + tag: + type: string + description: Tag to publish (e.g. aqua/v1.2.3) + required: true + dry_run: + type: boolean + description: Dry run (preview publish commands) + required: false + default: false + +permissions: + id-token: write + contents: read + packages: write + +jobs: + determine: + runs-on: ubuntu-latest + outputs: + tag: ${{ steps.tag.outputs.value }} + project: ${{ steps.project.outputs.value }} + sdk_path: ${{ steps.project.outputs.sdk_path }} + package_name: ${{ steps.project.outputs.package_name }} + steps: + - id: tag + run: | + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + echo "value=${{ inputs.tag }}" >> "$GITHUB_OUTPUT" + else + echo "value=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT" + fi + + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ steps.tag.outputs.value }} + fetch-depth: 1 + + - id: project + run: | + TAG="${{ steps.tag.outputs.value }}" + + PROJECT="${TAG%%/v*}" + if [ -z "$PROJECT" ] || [ "$PROJECT" = "$TAG" ]; then + echo "Unable to derive project from tag: $TAG" + exit 1 + fi + + echo "value=$PROJECT" >> "$GITHUB_OUTPUT" + SDK_PATH="typescript/$PROJECT" + echo "sdk_path=$SDK_PATH" >> "$GITHUB_OUTPUT" + PKG_NAME=$(node -p "require('./$SDK_PATH/package.json').name") + echo "package_name=$PKG_NAME" >> "$GITHUB_OUTPUT" + + publish: + needs: determine + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + env: + PUBLISH_DRY_RUN: ${{ inputs.dry_run || 'false' }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ needs.determine.outputs.tag }} + fetch-depth: 0 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: pnpm + registry-url: https://registry.npmjs.org + always-auth: true + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build package (pnpm) + run: pnpm --filter "${{ needs.determine.outputs.package_name }}" build + + - name: Publish to npmjs + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: | + SDK_PATH=${{ needs.determine.outputs.sdk_path }} + cd "$SDK_PATH/dist" + + TAG_ARG="" + VERSION=$(node -p "require('../package.json').version") + if [[ "$VERSION" == *"-rc"* ]]; then + TAG_ARG="--tag next" + fi + + if [ "$PUBLISH_DRY_RUN" = "true" ]; then + npm publish --access public $TAG_ARG --dry-run + else + npm publish --access public $TAG_ARG + fi + + - name: Publish to GitHub Packages + env: + NODE_AUTH_TOKEN: ${{ github.token }} + run: | + SDK_PATH=${{ needs.determine.outputs.sdk_path }} + cd "$SDK_PATH/dist" + + npm config set @1inch:registry https://npm.pkg.github.com + npm config set //npm.pkg.github.com/:_authToken "${NODE_AUTH_TOKEN}" + if [ "$PUBLISH_DRY_RUN" = "true" ]; then + npm publish --access public --dry-run + else + npm publish --access public + fi diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cb3b5df..87418c8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -73,14 +73,21 @@ jobs: run: | SPECIFIER="${{ inputs.bump }}" + PREID_FLAG="" + if [ "${{ inputs.bump }}" = "prerelease" ] && [ -n "${{ inputs.preid }}" ]; then + PREID_FLAG="--preid ${{ inputs.preid }}" + fi + DRY_RUN_FLAG="" if [ "${{ inputs.dry_run }}" = "true" ]; then DRY_RUN_FLAG="--dry-run" fi - npx nx release version "$SPECIFIER" --projects="${{ inputs.project }}" $DRY_RUN_FLAG --verbose + OUTPUT_JSON=$(mktemp) + npx nx release version "$SPECIFIER" --projects="${{ inputs.project }}" $PREID_FLAG $DRY_RUN_FLAG --verbose --output-style=json > "$OUTPUT_JSON" + + VERSION=$(node -e "const o=require('${OUTPUT_JSON}'); const p=o.projects?.['${{ inputs.project }}']; console.log(p?.newVersion || p?.currentVersion || 'unknown');") - VERSION=$(node -p "require('./typescript/${{ inputs.project }}/package.json').version") echo "version=$VERSION" >> "$GITHUB_OUTPUT" - name: Show next version (not updated in case of dry run) From 1fee45009f47a2b2e2502539ae44b58b39368f0b Mon Sep 17 00:00:00 2001 From: Dmitry Chepurovskiy Date: Tue, 25 Nov 2025 16:48:26 +0200 Subject: [PATCH 05/39] ITSM-1219: WIP --- .github/workflows/publish.yml | 15 ++++----------- .github/workflows/release.yml | 18 ++++++++++-------- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f7c43be..32cc8c0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -104,12 +104,8 @@ jobs: if [[ "$VERSION" == *"-rc"* ]]; then TAG_ARG="--tag next" fi - - if [ "$PUBLISH_DRY_RUN" = "true" ]; then - npm publish --access public $TAG_ARG --dry-run - else - npm publish --access public $TAG_ARG - fi + DRY_ARG=$([ "$PUBLISH_DRY_RUN" = "true" ] && echo "--dry-run") + npm publish --access public $TAG_ARG $DRY_ARG - name: Publish to GitHub Packages env: @@ -120,8 +116,5 @@ jobs: npm config set @1inch:registry https://npm.pkg.github.com npm config set //npm.pkg.github.com/:_authToken "${NODE_AUTH_TOKEN}" - if [ "$PUBLISH_DRY_RUN" = "true" ]; then - npm publish --access public --dry-run - else - npm publish --access public - fi + DRY_ARG=$([ "$PUBLISH_DRY_RUN" = "true" ] && echo "--dry-run") + npm publish --access public $DRY_ARG diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 87418c8..8adf432 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -83,12 +83,14 @@ jobs: DRY_RUN_FLAG="--dry-run" fi - OUTPUT_JSON=$(mktemp) - npx nx release version "$SPECIFIER" --projects="${{ inputs.project }}" $PREID_FLAG $DRY_RUN_FLAG --verbose --output-style=json > "$OUTPUT_JSON" + CURRENT_VERSION=$(node -p "require('./typescript/${{ inputs.project }}/package.json').version") + npx nx release version "$SPECIFIER" --projects="${{ inputs.project }}" $PREID_FLAG $DRY_RUN_FLAG --verbose - VERSION=$(node -e "const o=require('${OUTPUT_JSON}'); const p=o.projects?.['${{ inputs.project }}']; console.log(p?.newVersion || p?.currentVersion || 'unknown');") - - echo "version=$VERSION" >> "$GITHUB_OUTPUT" - - - name: Show next version (not updated in case of dry run) - run: echo "Version = ${{ steps.version.outputs.version }}" + - name: Show updated version + run: | + if [ "${{ inputs.dry_run }}" = "true" ]; then + echo "(dry-run: version on disk is unchanged)" + else + VERSION=$(node -p "require('./typescript/${{ inputs.project }}/package.json').version") + echo "Version = $VERSION" + fi From 9d71a5bbd54906562be27e5e5b642c40f80e5d73 Mon Sep 17 00:00:00 2001 From: CI/CD Bot Date: Tue, 25 Nov 2025 14:49:14 +0000 Subject: [PATCH 06/39] chore(release): - project: sdk-core 0.1.1-pipeline-test-0.0 --- typescript/sdk-core/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/sdk-core/package.json b/typescript/sdk-core/package.json index bd7c7b5..292ffba 100644 --- a/typescript/sdk-core/package.json +++ b/typescript/sdk-core/package.json @@ -1,6 +1,6 @@ { "name": "@1inch/sdk-core", - "version": "0.1.0", + "version": "0.1.1-pipeline-test-0.0", "description": "Core utilities and types for 1inch SDKs", "author": "@1inch", "repository": { From 1649083de04b449ffb584dde3d4fbe558824d8b7 Mon Sep 17 00:00:00 2001 From: Dmitry Chepurovskiy Date: Tue, 25 Nov 2025 16:54:56 +0200 Subject: [PATCH 07/39] ITSM-1219: WIP --- .github/workflows/release.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8adf432..097b5a6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -66,7 +66,7 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} - - name: Run Nx release version + - name: Run Nx release id: version env: GITHUB_TOKEN: ${{ github.token }} @@ -83,14 +83,18 @@ jobs: DRY_RUN_FLAG="--dry-run" fi - CURRENT_VERSION=$(node -p "require('./typescript/${{ inputs.project }}/package.json').version") - npx nx release version "$SPECIFIER" --projects="${{ inputs.project }}" $PREID_FLAG $DRY_RUN_FLAG --verbose + npx nx release "$SPECIFIER" \ + --projects="${{ inputs.project }}" \ + $PREID_FLAG \ + $DRY_RUN_FLAG \ + --skip-publish \ + --yes \ + --verbose - name: Show updated version run: | if [ "${{ inputs.dry_run }}" = "true" ]; then echo "(dry-run: version on disk is unchanged)" - else - VERSION=$(node -p "require('./typescript/${{ inputs.project }}/package.json').version") - echo "Version = $VERSION" fi + VERSION=$(node -p "require('./typescript/${{ inputs.project }}/package.json').version") + echo "Version = $VERSION" From 3ae94c0aaf14291f15698081f5cfeb421bf5d289 Mon Sep 17 00:00:00 2001 From: Dmitry Chepurovskiy Date: Tue, 25 Nov 2025 16:57:28 +0200 Subject: [PATCH 08/39] ITSM-1219: WIP --- .github/workflows/release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 097b5a6..02cf4b5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -88,7 +88,6 @@ jobs: $PREID_FLAG \ $DRY_RUN_FLAG \ --skip-publish \ - --yes \ --verbose - name: Show updated version From 7bf3855e2bf93000b60ba35ade687e0c149dafa5 Mon Sep 17 00:00:00 2001 From: Dmitry Chepurovskiy Date: Tue, 25 Nov 2025 17:00:29 +0200 Subject: [PATCH 09/39] ITSM-1219: WIP --- nx.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/nx.json b/nx.json index a4ca65e..d9e3307 100644 --- a/nx.json +++ b/nx.json @@ -82,16 +82,16 @@ "automaticFromRef": true }, "version": { - "git": { - "commit": true, - "commitMessage": "chore(release): {version}", - "tag": true, - "push": true, - "stageChanges": true - }, "updateDependents": "never", "logUnchangedProjects": true }, + "git": { + "commit": true, + "commitMessage": "chore(release): {version}", + "tag": true, + "push": true, + "stageChanges": true + }, "groups": { "typescript": { "projects": ["typescript/*"], From c97aeaf4e8612bb4c86cf1994f90731e5fddae16 Mon Sep 17 00:00:00 2001 From: CI/CD Bot Date: Tue, 25 Nov 2025 15:01:54 +0000 Subject: [PATCH 10/39] chore(release): - project: sdk-core 0.1.1-pipeline-test.0 --- typescript/sdk-core/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/sdk-core/package.json b/typescript/sdk-core/package.json index 292ffba..462c668 100644 --- a/typescript/sdk-core/package.json +++ b/typescript/sdk-core/package.json @@ -1,6 +1,6 @@ { "name": "@1inch/sdk-core", - "version": "0.1.1-pipeline-test-0.0", + "version": "0.1.1-pipeline-test.0", "description": "Core utilities and types for 1inch SDKs", "author": "@1inch", "repository": { From 88607268f8a05fef729b5c2f6d669ab7bb821bbd Mon Sep 17 00:00:00 2001 From: CI/CD Bot Date: Tue, 25 Nov 2025 15:07:15 +0000 Subject: [PATCH 11/39] chore(release): - project: sdk-core 0.1.1-pipeline-test.1 --- typescript/sdk-core/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/sdk-core/package.json b/typescript/sdk-core/package.json index 462c668..dc101ca 100644 --- a/typescript/sdk-core/package.json +++ b/typescript/sdk-core/package.json @@ -1,6 +1,6 @@ { "name": "@1inch/sdk-core", - "version": "0.1.1-pipeline-test.0", + "version": "0.1.1-pipeline-test.1", "description": "Core utilities and types for 1inch SDKs", "author": "@1inch", "repository": { From bec0e01c30567fab724d7d6be5385547a8043478 Mon Sep 17 00:00:00 2001 From: Dmitry Chepurovskiy Date: Tue, 25 Nov 2025 17:22:46 +0200 Subject: [PATCH 12/39] ITSM-1219: Add pipeline triggers for testing of new pipelines in a branch --- .github/workflows/publish.yml | 120 ---------------------------------- .github/workflows/release.yml | 108 +++++++++++++++++++++++++++++- 2 files changed, 106 insertions(+), 122 deletions(-) delete mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 32cc8c0..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,120 +0,0 @@ -name: Publish - -on: - push: - tags: - - '*/v*.*.*' - workflow_dispatch: - inputs: - tag: - type: string - description: Tag to publish (e.g. aqua/v1.2.3) - required: true - dry_run: - type: boolean - description: Dry run (preview publish commands) - required: false - default: false - -permissions: - id-token: write - contents: read - packages: write - -jobs: - determine: - runs-on: ubuntu-latest - outputs: - tag: ${{ steps.tag.outputs.value }} - project: ${{ steps.project.outputs.value }} - sdk_path: ${{ steps.project.outputs.sdk_path }} - package_name: ${{ steps.project.outputs.package_name }} - steps: - - id: tag - run: | - if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - echo "value=${{ inputs.tag }}" >> "$GITHUB_OUTPUT" - else - echo "value=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT" - fi - - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ steps.tag.outputs.value }} - fetch-depth: 1 - - - id: project - run: | - TAG="${{ steps.tag.outputs.value }}" - - PROJECT="${TAG%%/v*}" - if [ -z "$PROJECT" ] || [ "$PROJECT" = "$TAG" ]; then - echo "Unable to derive project from tag: $TAG" - exit 1 - fi - - echo "value=$PROJECT" >> "$GITHUB_OUTPUT" - SDK_PATH="typescript/$PROJECT" - echo "sdk_path=$SDK_PATH" >> "$GITHUB_OUTPUT" - PKG_NAME=$(node -p "require('./$SDK_PATH/package.json').name") - echo "package_name=$PKG_NAME" >> "$GITHUB_OUTPUT" - - publish: - needs: determine - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - env: - PUBLISH_DRY_RUN: ${{ inputs.dry_run || 'false' }} - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ needs.determine.outputs.tag }} - fetch-depth: 0 - - - name: Install pnpm - uses: pnpm/action-setup@v4 - - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: 22 - cache: pnpm - registry-url: https://registry.npmjs.org - always-auth: true - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - - name: Build package (pnpm) - run: pnpm --filter "${{ needs.determine.outputs.package_name }}" build - - - name: Publish to npmjs - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - run: | - SDK_PATH=${{ needs.determine.outputs.sdk_path }} - cd "$SDK_PATH/dist" - - TAG_ARG="" - VERSION=$(node -p "require('../package.json').version") - if [[ "$VERSION" == *"-rc"* ]]; then - TAG_ARG="--tag next" - fi - DRY_ARG=$([ "$PUBLISH_DRY_RUN" = "true" ] && echo "--dry-run") - npm publish --access public $TAG_ARG $DRY_ARG - - - name: Publish to GitHub Packages - env: - NODE_AUTH_TOKEN: ${{ github.token }} - run: | - SDK_PATH=${{ needs.determine.outputs.sdk_path }} - cd "$SDK_PATH/dist" - - npm config set @1inch:registry https://npm.pkg.github.com - npm config set //npm.pkg.github.com/:_authToken "${NODE_AUTH_TOKEN}" - DRY_ARG=$([ "$PUBLISH_DRY_RUN" = "true" ] && echo "--dry-run") - npm publish --access public $DRY_ARG diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 02cf4b5..3cc16df 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,6 +39,12 @@ permissions: jobs: release: runs-on: ubuntu-latest + outputs: + project: ${{ steps.pkg.outputs.project }} + sdk_path: ${{ steps.pkg.outputs.sdk_path }} + package_name: ${{ steps.pkg.outputs.package_name }} + pkg_version: ${{ steps.pkg.outputs.pkg_version }} + tag: ${{ steps.pkg.outputs.tag }} steps: - name: Checkout master uses: actions/checkout@v4 @@ -90,10 +96,108 @@ jobs: --skip-publish \ --verbose + - name: Resolve package info + id: pkg + run: | + SDK_PATH="typescript/${{ inputs.project }}" + PKG_NAME=$(node -p "require('./$SDK_PATH/package.json').name") + PKG_VERSION=$(node -p "require('./$SDK_PATH/package.json').version") + TAG="${{ inputs.project }}/v${PKG_VERSION}" + + echo "project=${{ inputs.project }}" >> "$GITHUB_OUTPUT" + echo "sdk_path=$SDK_PATH" >> "$GITHUB_OUTPUT" + echo "package_name=$PKG_NAME" >> "$GITHUB_OUTPUT" + echo "pkg_version=$PKG_VERSION" >> "$GITHUB_OUTPUT" + echo "tag=$TAG" >> "$GITHUB_OUTPUT" + - name: Show updated version run: | if [ "${{ inputs.dry_run }}" = "true" ]; then echo "(dry-run: version on disk is unchanged)" fi - VERSION=$(node -p "require('./typescript/${{ inputs.project }}/package.json').version") - echo "Version = $VERSION" + echo "Version = ${{ steps.pkg.outputs.pkg_version }}" + + publish-npmjs: + runs-on: ubuntu-latest + needs: release + if: ${{ github.event.inputs.dry_run != 'true' }} + permissions: + contents: read + packages: write + steps: + - name: Checkout tag + uses: actions/checkout@v4 + with: + ref: ${{ needs.release.outputs.tag }} + fetch-depth: 0 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: pnpm + registry-url: https://registry.npmjs.org + always-auth: true + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build package (pnpm) + run: pnpm --filter "${{ needs.release.outputs.package_name }}" build + + - name: Publish to npmjs + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: | + cd "${{ needs.release.outputs.sdk_path }}/dist" + + TAG_ARG="" + VERSION="${{ needs.release.outputs.pkg_version }}" + if [[ "$VERSION" == *"-rc"* ]]; then + TAG_ARG="--tag next" + fi + + npm publish --access public $TAG_ARG + + publish-github-packages: + runs-on: ubuntu-latest + needs: release + if: ${{ github.event.inputs.dry_run != 'true' }} + permissions: + contents: read + packages: write + steps: + - name: Checkout tag + uses: actions/checkout@v4 + with: + ref: ${{ needs.release.outputs.tag }} + fetch-depth: 0 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build package (pnpm) + run: pnpm --filter "${{ needs.release.outputs.package_name }}" build + + - name: Publish to GitHub Packages + env: + NODE_AUTH_TOKEN: ${{ github.token }} + run: | + cd "${{ needs.release.outputs.sdk_path }}/dist" + + npm config set @1inch:registry https://npm.pkg.github.com + npm config set //npm.pkg.github.com/:_authToken "${NODE_AUTH_TOKEN}" + + npm publish --access public From d7122c261b5d64e5b8442ac19f5d9629f6ab2b98 Mon Sep 17 00:00:00 2001 From: Dmitry Chepurovskiy Date: Tue, 25 Nov 2025 17:24:43 +0200 Subject: [PATCH 13/39] ITSM-1219: Add pipeline triggers for testing of new pipelines in a branch --- .github/workflows/release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3cc16df..7bf2bef 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -155,8 +155,7 @@ jobs: cd "${{ needs.release.outputs.sdk_path }}/dist" TAG_ARG="" - VERSION="${{ needs.release.outputs.pkg_version }}" - if [[ "$VERSION" == *"-rc"* ]]; then + if [ "${{ github.event.inputs.bump }}" = "prerelease" ]; then TAG_ARG="--tag next" fi From 91598de50f34c98b3b31eb0fb62268b26707ef43 Mon Sep 17 00:00:00 2001 From: CI/CD Bot Date: Tue, 25 Nov 2025 15:26:05 +0000 Subject: [PATCH 14/39] chore(release): - project: sdk-core 0.1.1-pipeline-test.2 --- typescript/sdk-core/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/sdk-core/package.json b/typescript/sdk-core/package.json index dc101ca..5f1ecf9 100644 --- a/typescript/sdk-core/package.json +++ b/typescript/sdk-core/package.json @@ -1,6 +1,6 @@ { "name": "@1inch/sdk-core", - "version": "0.1.1-pipeline-test.1", + "version": "0.1.1-pipeline-test.2", "description": "Core utilities and types for 1inch SDKs", "author": "@1inch", "repository": { From 05c494dfb96946312504b4928a65d093b4155bcc Mon Sep 17 00:00:00 2001 From: Dmitry Chepurovskiy Date: Tue, 25 Nov 2025 17:27:04 +0200 Subject: [PATCH 15/39] ITSM-1219: Add pipeline triggers for testing of new pipelines in a branch --- .github/workflows/release.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7bf2bef..168fde2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -152,8 +152,6 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} run: | - cd "${{ needs.release.outputs.sdk_path }}/dist" - TAG_ARG="" if [ "${{ github.event.inputs.bump }}" = "prerelease" ]; then TAG_ARG="--tag next" @@ -194,8 +192,6 @@ jobs: env: NODE_AUTH_TOKEN: ${{ github.token }} run: | - cd "${{ needs.release.outputs.sdk_path }}/dist" - npm config set @1inch:registry https://npm.pkg.github.com npm config set //npm.pkg.github.com/:_authToken "${NODE_AUTH_TOKEN}" From d90d130243d13796ebc7a40e97629d7c40b51282 Mon Sep 17 00:00:00 2001 From: CI/CD Bot Date: Tue, 25 Nov 2025 15:27:40 +0000 Subject: [PATCH 16/39] chore(release): - project: sdk-core 0.1.1-pipeline-test.3 --- typescript/sdk-core/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/sdk-core/package.json b/typescript/sdk-core/package.json index 5f1ecf9..9f5f221 100644 --- a/typescript/sdk-core/package.json +++ b/typescript/sdk-core/package.json @@ -1,6 +1,6 @@ { "name": "@1inch/sdk-core", - "version": "0.1.1-pipeline-test.2", + "version": "0.1.1-pipeline-test.3", "description": "Core utilities and types for 1inch SDKs", "author": "@1inch", "repository": { From b296b2b909bb910c5c2b03d00bcf7d4e5cc74fe4 Mon Sep 17 00:00:00 2001 From: Dmitry Chepurovskiy Date: Tue, 25 Nov 2025 17:38:09 +0200 Subject: [PATCH 17/39] ITSM-1219: WIP --- package.json | 1 - typescript/README.md | 13 +++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 338b7e2..a10771a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,6 @@ { "name": "@1inch/sdks", "version": "0.0.0", - "private": true, "description": "1inch Protocol SDKs monorepo managed with NX", "scripts": { "nx": "nx", diff --git a/typescript/README.md b/typescript/README.md index d98e5bb..0362e0f 100644 --- a/typescript/README.md +++ b/typescript/README.md @@ -82,20 +82,21 @@ pnpm lint:types 1. **Create a new release:** - Go to GitHub Actions โ†’ "Release" - - Pick the SDK to release - - Choose the bump (patch, minor, major, prerelease, or custom version) - - Releases run on `master` and refuse to proceed if local `master` is behind `origin/master` + - Pick the SDK to release (aqua, sdk-core, swap-vm) + - Choose the bump (patch, minor, major, prerelease; prerelease can take a `preid`) - Dependents are not auto-bumped (NX `updateDependents=never`) 2. **Automatic publishing:** - - The release workflow commits + tags (e.g., `aqua/v1.0.0`) - - Tag push triggers the publish workflow - - Publish workflow builds and publishes to npmjs and GitHub Packages (`next` tag is used for `-rc` prereleases) + - The release workflow commits + tags (e.g., `aqua/v1.0.0`) and generates changelogs/GitHub Releases + - Publish happens in the same workflow (split jobs for npmjs and GitHub Packages) + - Prerelease bumps publish with npm dist-tag `next`; normal bumps use the default tag + - Dry runs skip publishing and leave on-disk versions unchanged ### Version Tags Each SDK has independent versioning with specific tag patterns: - `aqua/v*.*.*` - @1inch/aqua-sdk +- `sdk-core/v*.*.*` - @1inch/sdk-core - `swap-vm/v*.*.*` - @1inch/swap-vm-sdk ## ๐Ÿ”ง Configuration From 63bba322a5463e90422591f06589c651ab7095e5 Mon Sep 17 00:00:00 2001 From: CI/CD Bot Date: Tue, 25 Nov 2025 15:38:58 +0000 Subject: [PATCH 18/39] chore(release): - project: sdk-core 0.1.1-pipeline-test.4 --- typescript/sdk-core/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/sdk-core/package.json b/typescript/sdk-core/package.json index 9f5f221..828643f 100644 --- a/typescript/sdk-core/package.json +++ b/typescript/sdk-core/package.json @@ -1,6 +1,6 @@ { "name": "@1inch/sdk-core", - "version": "0.1.1-pipeline-test.3", + "version": "0.1.1-pipeline-test.4", "description": "Core utilities and types for 1inch SDKs", "author": "@1inch", "repository": { From fc097f8fdd47e97974210cd31f22a3608f45db29 Mon Sep 17 00:00:00 2001 From: Dmitry Chepurovskiy Date: Tue, 25 Nov 2025 17:41:07 +0200 Subject: [PATCH 19/39] ITSM-1219: WIP --- .github/workflows/release.yml | 2 ++ package.json | 1 + 2 files changed, 3 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 168fde2..03ea0d7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -151,6 +151,7 @@ jobs: - name: Publish to npmjs env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + working-directory: ${{ needs.release.outputs.sdk_path }} run: | TAG_ARG="" if [ "${{ github.event.inputs.bump }}" = "prerelease" ]; then @@ -191,6 +192,7 @@ jobs: - name: Publish to GitHub Packages env: NODE_AUTH_TOKEN: ${{ github.token }} + working-directory: ${{ needs.release.outputs.sdk_path }} run: | npm config set @1inch:registry https://npm.pkg.github.com npm config set //npm.pkg.github.com/:_authToken "${NODE_AUTH_TOKEN}" diff --git a/package.json b/package.json index a10771a..338b7e2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "@1inch/sdks", "version": "0.0.0", + "private": true, "description": "1inch Protocol SDKs monorepo managed with NX", "scripts": { "nx": "nx", From 6290cb16f3ce4adfe71d69c8536b1050d17405bb Mon Sep 17 00:00:00 2001 From: CI/CD Bot Date: Tue, 25 Nov 2025 15:41:43 +0000 Subject: [PATCH 20/39] chore(release): - project: sdk-core 0.1.1-pipeline-test.5 --- typescript/sdk-core/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/sdk-core/package.json b/typescript/sdk-core/package.json index 828643f..00ab87b 100644 --- a/typescript/sdk-core/package.json +++ b/typescript/sdk-core/package.json @@ -1,6 +1,6 @@ { "name": "@1inch/sdk-core", - "version": "0.1.1-pipeline-test.4", + "version": "0.1.1-pipeline-test.5", "description": "Core utilities and types for 1inch SDKs", "author": "@1inch", "repository": { From be229252b814f1f3a544276a18a095b96d9e2078 Mon Sep 17 00:00:00 2001 From: Dmitry Chepurovskiy Date: Tue, 25 Nov 2025 17:47:06 +0200 Subject: [PATCH 21/39] ITSM-1219: WIP --- .github/workflows/release.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 03ea0d7..e9c3028 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -142,6 +142,9 @@ jobs: registry-url: https://registry.npmjs.org always-auth: true + - name: Install npm@11 + run: npm install -g npm@11 + - name: Install dependencies run: pnpm install --frozen-lockfile @@ -151,8 +154,10 @@ jobs: - name: Publish to npmjs env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - working-directory: ${{ needs.release.outputs.sdk_path }} + working-directory: ${{ needs.release.outputs.sdk_path }}/dist run: | + npm config set //registry.npmjs.org/:_authToken "${NODE_AUTH_TOKEN}" + npm config set registry https://registry.npmjs.org TAG_ARG="" if [ "${{ github.event.inputs.bump }}" = "prerelease" ]; then TAG_ARG="--tag next" @@ -192,7 +197,7 @@ jobs: - name: Publish to GitHub Packages env: NODE_AUTH_TOKEN: ${{ github.token }} - working-directory: ${{ needs.release.outputs.sdk_path }} + working-directory: ${{ needs.release.outputs.sdk_path }}/dist run: | npm config set @1inch:registry https://npm.pkg.github.com npm config set //npm.pkg.github.com/:_authToken "${NODE_AUTH_TOKEN}" From 122b22db10c8bff9594a855c377a1861a26c4864 Mon Sep 17 00:00:00 2001 From: Dmitry Chepurovskiy Date: Tue, 25 Nov 2025 17:48:25 +0200 Subject: [PATCH 22/39] ITSM-1219: WIP --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e9c3028..3ace504 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -156,6 +156,7 @@ jobs: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} working-directory: ${{ needs.release.outputs.sdk_path }}/dist run: | + npm config set loglevel silly npm config set //registry.npmjs.org/:_authToken "${NODE_AUTH_TOKEN}" npm config set registry https://registry.npmjs.org TAG_ARG="" From 058465c4b071a5741995654ad66bf7ab8a87504f Mon Sep 17 00:00:00 2001 From: CI/CD Bot Date: Tue, 25 Nov 2025 15:48:55 +0000 Subject: [PATCH 23/39] chore(release): - project: sdk-core 0.1.1-pipeline-test.6 --- typescript/sdk-core/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/sdk-core/package.json b/typescript/sdk-core/package.json index 00ab87b..88adc26 100644 --- a/typescript/sdk-core/package.json +++ b/typescript/sdk-core/package.json @@ -1,6 +1,6 @@ { "name": "@1inch/sdk-core", - "version": "0.1.1-pipeline-test.5", + "version": "0.1.1-pipeline-test.6", "description": "Core utilities and types for 1inch SDKs", "author": "@1inch", "repository": { From 76b21a91e885caa239127f42172683013490a5f8 Mon Sep 17 00:00:00 2001 From: Dmitry Chepurovskiy Date: Tue, 25 Nov 2025 17:49:56 +0200 Subject: [PATCH 24/39] ITSM-1219: WIP --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3ace504..f76d1b5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -154,7 +154,7 @@ jobs: - name: Publish to npmjs env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - working-directory: ${{ needs.release.outputs.sdk_path }}/dist + working-directory: ${{ needs.release.outputs.sdk_path }} run: | npm config set loglevel silly npm config set //registry.npmjs.org/:_authToken "${NODE_AUTH_TOKEN}" @@ -198,7 +198,7 @@ jobs: - name: Publish to GitHub Packages env: NODE_AUTH_TOKEN: ${{ github.token }} - working-directory: ${{ needs.release.outputs.sdk_path }}/dist + working-directory: ${{ needs.release.outputs.sdk_path }} run: | npm config set @1inch:registry https://npm.pkg.github.com npm config set //npm.pkg.github.com/:_authToken "${NODE_AUTH_TOKEN}" From e256f805d8c2096e37eeba90b32c9fbc3ad9f4bd Mon Sep 17 00:00:00 2001 From: CI/CD Bot Date: Tue, 25 Nov 2025 15:50:31 +0000 Subject: [PATCH 25/39] chore(release): - project: sdk-core 0.1.1-pipeline-test.7 --- typescript/sdk-core/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/sdk-core/package.json b/typescript/sdk-core/package.json index 88adc26..0393c13 100644 --- a/typescript/sdk-core/package.json +++ b/typescript/sdk-core/package.json @@ -1,6 +1,6 @@ { "name": "@1inch/sdk-core", - "version": "0.1.1-pipeline-test.6", + "version": "0.1.1-pipeline-test.7", "description": "Core utilities and types for 1inch SDKs", "author": "@1inch", "repository": { From a6438501eea3857b32e19e4b10f94f25fe16f18c Mon Sep 17 00:00:00 2001 From: Dmitry Chepurovskiy Date: Tue, 25 Nov 2025 17:51:23 +0200 Subject: [PATCH 26/39] ITSM-1219: WIP --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f76d1b5..5e5f8c6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -124,6 +124,7 @@ jobs: permissions: contents: read packages: write + id-token: write steps: - name: Checkout tag uses: actions/checkout@v4 From 06d4a89986911f3b839e174d6d25b2d2e9529206 Mon Sep 17 00:00:00 2001 From: CI/CD Bot Date: Tue, 25 Nov 2025 15:52:04 +0000 Subject: [PATCH 27/39] chore(release): - project: sdk-core 0.1.1-pipeline-test.8 --- typescript/sdk-core/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/sdk-core/package.json b/typescript/sdk-core/package.json index 0393c13..fe2cb17 100644 --- a/typescript/sdk-core/package.json +++ b/typescript/sdk-core/package.json @@ -1,6 +1,6 @@ { "name": "@1inch/sdk-core", - "version": "0.1.1-pipeline-test.7", + "version": "0.1.1-pipeline-test.8", "description": "Core utilities and types for 1inch SDKs", "author": "@1inch", "repository": { From c44e6713441706eb3491aafd53a3f50ffcc6cac4 Mon Sep 17 00:00:00 2001 From: Dmitry Chepurovskiy Date: Tue, 25 Nov 2025 17:52:52 +0200 Subject: [PATCH 28/39] ITSM-1219: WIP --- .github/workflows/release.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e5f8c6..d6f2291 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -143,9 +143,6 @@ jobs: registry-url: https://registry.npmjs.org always-auth: true - - name: Install npm@11 - run: npm install -g npm@11 - - name: Install dependencies run: pnpm install --frozen-lockfile @@ -157,7 +154,6 @@ jobs: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} working-directory: ${{ needs.release.outputs.sdk_path }} run: | - npm config set loglevel silly npm config set //registry.npmjs.org/:_authToken "${NODE_AUTH_TOKEN}" npm config set registry https://registry.npmjs.org TAG_ARG="" From adab82127f973fe96394e485d571024d3878a115 Mon Sep 17 00:00:00 2001 From: CI/CD Bot Date: Tue, 25 Nov 2025 15:53:30 +0000 Subject: [PATCH 29/39] chore(release): - project: sdk-core 0.1.1-pipeline-test.9 --- typescript/sdk-core/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/sdk-core/package.json b/typescript/sdk-core/package.json index fe2cb17..656f580 100644 --- a/typescript/sdk-core/package.json +++ b/typescript/sdk-core/package.json @@ -1,6 +1,6 @@ { "name": "@1inch/sdk-core", - "version": "0.1.1-pipeline-test.8", + "version": "0.1.1-pipeline-test.9", "description": "Core utilities and types for 1inch SDKs", "author": "@1inch", "repository": { From dc4dde8c234f2e215dfb85b146ae78da64039952 Mon Sep 17 00:00:00 2001 From: Dmitry Chepurovskiy Date: Tue, 25 Nov 2025 17:54:59 +0200 Subject: [PATCH 30/39] ITSM-1219: WIP --- .github/workflows/release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d6f2291..3e09f49 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -143,6 +143,9 @@ jobs: registry-url: https://registry.npmjs.org always-auth: true + - name: Install npm@11 + run: npm install -g npm@11 + - name: Install dependencies run: pnpm install --frozen-lockfile From 280c3badb141ff7f573215cf9c6aa42f9d0f2d76 Mon Sep 17 00:00:00 2001 From: CI/CD Bot Date: Tue, 25 Nov 2025 15:55:32 +0000 Subject: [PATCH 31/39] chore(release): - project: sdk-core 0.1.1-pipeline-test.10 --- typescript/sdk-core/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/sdk-core/package.json b/typescript/sdk-core/package.json index 656f580..41b23fd 100644 --- a/typescript/sdk-core/package.json +++ b/typescript/sdk-core/package.json @@ -1,6 +1,6 @@ { "name": "@1inch/sdk-core", - "version": "0.1.1-pipeline-test.9", + "version": "0.1.1-pipeline-test.10", "description": "Core utilities and types for 1inch SDKs", "author": "@1inch", "repository": { From 8c171708762285de30cc3c1e0530e4631cb66a17 Mon Sep 17 00:00:00 2001 From: Dmitry Chepurovskiy Date: Tue, 25 Nov 2025 17:56:58 +0200 Subject: [PATCH 32/39] ITSM-1219: WIP --- .github/workflows/release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3e09f49..37f598b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -143,6 +143,7 @@ jobs: registry-url: https://registry.npmjs.org always-auth: true + # Updating npm to 11 since it's minimal version supporting "npm publish" with OIDC token - name: Install npm@11 run: npm install -g npm@11 @@ -153,8 +154,6 @@ jobs: run: pnpm --filter "${{ needs.release.outputs.package_name }}" build - name: Publish to npmjs - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} working-directory: ${{ needs.release.outputs.sdk_path }} run: | npm config set //registry.npmjs.org/:_authToken "${NODE_AUTH_TOKEN}" From c3961b85f8a76148b60c583c0c62c84491204044 Mon Sep 17 00:00:00 2001 From: CI/CD Bot Date: Tue, 25 Nov 2025 15:57:34 +0000 Subject: [PATCH 33/39] chore(release): - project: sdk-core 0.1.1-pipeline-test.11 --- typescript/sdk-core/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/sdk-core/package.json b/typescript/sdk-core/package.json index 41b23fd..4596884 100644 --- a/typescript/sdk-core/package.json +++ b/typescript/sdk-core/package.json @@ -1,6 +1,6 @@ { "name": "@1inch/sdk-core", - "version": "0.1.1-pipeline-test.10", + "version": "0.1.1-pipeline-test.11", "description": "Core utilities and types for 1inch SDKs", "author": "@1inch", "repository": { From eaf9f037399255a801a49131036e9b792bad8eae Mon Sep 17 00:00:00 2001 From: Dmitry Chepurovskiy Date: Tue, 25 Nov 2025 17:59:35 +0200 Subject: [PATCH 34/39] Revert package version to master one --- typescript/sdk-core/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/sdk-core/package.json b/typescript/sdk-core/package.json index 4596884..bd7c7b5 100644 --- a/typescript/sdk-core/package.json +++ b/typescript/sdk-core/package.json @@ -1,6 +1,6 @@ { "name": "@1inch/sdk-core", - "version": "0.1.1-pipeline-test.11", + "version": "0.1.0", "description": "Core utilities and types for 1inch SDKs", "author": "@1inch", "repository": { From de576aee464b50e9069c37de97bfbfb450fc1a3a Mon Sep 17 00:00:00 2001 From: Dmitry Chepurovskiy Date: Tue, 25 Nov 2025 18:05:46 +0200 Subject: [PATCH 35/39] Update .github/workflows/release.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/release.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 37f598b..828f943 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -156,8 +156,6 @@ jobs: - name: Publish to npmjs working-directory: ${{ needs.release.outputs.sdk_path }} run: | - npm config set //registry.npmjs.org/:_authToken "${NODE_AUTH_TOKEN}" - npm config set registry https://registry.npmjs.org TAG_ARG="" if [ "${{ github.event.inputs.bump }}" = "prerelease" ]; then TAG_ARG="--tag next" From 4c0f76d593f83adaafc67be70120462e5f8489d0 Mon Sep 17 00:00:00 2001 From: Dmitry Chepurovskiy Date: Tue, 25 Nov 2025 18:05:59 +0200 Subject: [PATCH 36/39] Update .github/workflows/release.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 828f943..5c34cdf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -161,7 +161,7 @@ jobs: TAG_ARG="--tag next" fi - npm publish --access public $TAG_ARG + npm publish --access public --provenance $TAG_ARG publish-github-packages: runs-on: ubuntu-latest From 719dd6453c993062480ffe3605a09032bc4ede65 Mon Sep 17 00:00:00 2001 From: CI/CD Bot Date: Tue, 25 Nov 2025 16:07:46 +0000 Subject: [PATCH 37/39] chore(release): - project: sdk-core 0.1.1-pipeline-final-test.0 --- typescript/sdk-core/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/sdk-core/package.json b/typescript/sdk-core/package.json index bd7c7b5..43e609b 100644 --- a/typescript/sdk-core/package.json +++ b/typescript/sdk-core/package.json @@ -1,6 +1,6 @@ { "name": "@1inch/sdk-core", - "version": "0.1.0", + "version": "0.1.1-pipeline-final-test.0", "description": "Core utilities and types for 1inch SDKs", "author": "@1inch", "repository": { From d131dc5335ffa4cfab212a9768b3dda8234245e5 Mon Sep 17 00:00:00 2001 From: Dmitry Chepurovskiy Date: Tue, 25 Nov 2025 18:08:35 +0200 Subject: [PATCH 38/39] Revert package version to master one --- typescript/sdk-core/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/sdk-core/package.json b/typescript/sdk-core/package.json index 43e609b..bd7c7b5 100644 --- a/typescript/sdk-core/package.json +++ b/typescript/sdk-core/package.json @@ -1,6 +1,6 @@ { "name": "@1inch/sdk-core", - "version": "0.1.1-pipeline-final-test.0", + "version": "0.1.0", "description": "Core utilities and types for 1inch SDKs", "author": "@1inch", "repository": { From 9f92a27ce931c3b4b0a11e3f7bee0c0b3ffce4a4 Mon Sep 17 00:00:00 2001 From: Dmitry Chepurovskiy Date: Wed, 26 Nov 2025 18:40:32 +0400 Subject: [PATCH 39/39] Update .github/workflows/release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5c34cdf..1bed1b3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Release +name: Release typescript on: workflow_dispatch: