From 179799d8556cebaa12df8afe0ef0e7c3d857e5c0 Mon Sep 17 00:00:00 2001 From: Grant Zukel <80433392+gzukel@users.noreply.github.com> Date: Tue, 9 Jan 2024 14:18:29 -0700 Subject: [PATCH] ci: add pipeline to publish typescript libraries (#1544) * ci: add typescript publishing * uncommented docker login --- .github/workflows/build.yml | 12 ++++---- .github/workflows/publish-typescript.yaml | 34 +++++++++++++++++++++++ changelog.md | 3 ++ 3 files changed, 43 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/publish-typescript.yaml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d71ccd8f2a..ded55ff1e2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -104,12 +104,12 @@ jobs: skip_aws_cli: "true" skip_docker_compose: "false" -# - name: Login to Docker Hub -# uses: docker/login-action@v2 -# if: github.event.repository.full_name == 'zetachain-chain/node' -# with: -# username: ${{ secrets.DOCKER_HUB_USERNAME }} -# password: ${{ secrets.DOCKER_HUB_READ_ONLY }} + - name: Login to Docker Hub + uses: docker/login-action@v2 + if: github.event.repository.full_name == 'zetachain-chain/node' + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_READ_ONLY }} - name: Build zetanode run: | diff --git a/.github/workflows/publish-typescript.yaml b/.github/workflows/publish-typescript.yaml new file mode 100644 index 0000000000..a5906d5047 --- /dev/null +++ b/.github/workflows/publish-typescript.yaml @@ -0,0 +1,34 @@ +name: Publish Typescript to NPM +on: + workflow_dispatch: + release: + types: [created] +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Node + uses: actions/setup-node@v2 + with: + node-version: '20.x' + registry-url: 'https://registry.npmjs.org' + + - name: Set Version + working-directory: typescript + run: | + version=$(cat app/setup_handlers.go | grep "const releaseVersion" | cut -d ' ' -f4 | tr -d '"') + npm version ${version} + sed -i 's/@zetachain\/blockchain-types/@zetachain\/node-types/' package.json + + - name: Install dependencies and build 🔧 + working-directory: typescript + run: npm ci && npm run build + + - name: Publish package on NPM 📦 + run: npm publish + working-directory: typescript + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/changelog.md b/changelog.md index 8cc99d1d24..17b3450361 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,8 @@ ## Unreleased +* ci: adding typescript publishing pipeline. + ### Breaking Changes * PendingNonces :Changed from `/zeta-chain/crosschain/pendingNonces/{chain_id}/{address}` to `/zeta-chain/observer/pendingNonces/{chain_id}/{address}` . It returns all the pending nonces for a chain id and address. This returns the current pending nonces for the chain. @@ -9,6 +11,7 @@ * ChainNoncesAll :Changed from `/zeta-chain/observer/chainNonces` to `/zeta-chain/observer/chainNonces` . It returns all the chain nonces for all chains. This returns the current nonce of the TSS address for all chains. ### Features + * [1395](https://github.com/zeta-chain/node/pull/1395) - Add state variable to track aborted zeta amount * [1410](https://github.com/zeta-chain/node/pull/1410) - `snapshots` commands * enable zetaclients to use dynamic gas price on zetachain - enables >0 min_gas_price in feemarket module