From a572c991415327dfc5f6d473ccaabab80dddac5e Mon Sep 17 00:00:00 2001 From: 0xverin <104152026+0xverin@users.noreply.github.com> Date: Tue, 31 Dec 2024 20:39:33 +0800 Subject: [PATCH] rm api release gha (#3222) --- .github/workflows/release-ts-api-package.yml | 111 ------------------- 1 file changed, 111 deletions(-) delete mode 100644 .github/workflows/release-ts-api-package.yml diff --git a/.github/workflows/release-ts-api-package.yml b/.github/workflows/release-ts-api-package.yml deleted file mode 100644 index 76f7795529..0000000000 --- a/.github/workflows/release-ts-api-package.yml +++ /dev/null @@ -1,111 +0,0 @@ -name: Release Ts API Package - -on: - workflow_dispatch: - inputs: - docker-tag: - description: "an existing docker tag (e.g. v0.9.18)" - required: true - release-tag: - description: "client-api release tag" - type: choice - options: - - latest - - next - default: 'latest' - -env: - NODE_AUTH_TOKEN: ${{ secrets.RELEASE_TS_API_PACKAGE_TOKEN }} - -jobs: - update-publish: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - - name: Set ENV - run: | - echo "DOCKER_TAG=${{inputs.docker-tag}}" >> $GITHUB_ENV - - - name: Pull litentry image optionally - run: | - docker pull parity/polkadot - docker pull litentry/identity-worker:$DOCKER_TAG - docker pull litentry/identity-cli:$DOCKER_TAG - docker pull litentry/litentry-parachain:$DOCKER_TAG - - - name: Re-tag docker image - run: | - docker tag litentry/identity-worker:$DOCKER_TAG litentry/identity-worker:latest - docker tag litentry/identity-cli:$DOCKER_TAG litentry/identity-cli:latest - docker tag litentry/litentry-parachain:$DOCKER_TAG litentry/litentry-parachain:latest - - - run: docker images --all - - - name: Enable corepack and pnpm - run: corepack enable && corepack enable pnpm - - - name: Generate parachain artefacts - run: | - ./tee-worker/scripts/litentry/generate_parachain_artefacts.sh - - - name: Build litentry parachain docker images - run: | - cd tee-worker/docker - docker compose -f litentry-parachain.build.yml build - - - name: Update metadata and generate types - run: | - cd tee-worker/docker - docker compose -f docker-compose.yml -f lit-ts-api-package-build.yml up --no-build --exit-code-from lit-ts-api-package-build lit-ts-api-package-build - - - name: Use Node.js - uses: actions/setup-node@v4 - with: - node-version: 18 - registry-url: "https://registry.npmjs.org" - - - name: Setup npm config - run: | - echo "//registry.npmjs.org/:_authToken=${{ secrets.RELEASE_TS_API_PACKAGE_TOKEN }}" > .npmrc - - - name: Publish parachain API and sidechain API - working-directory: ./tee-worker/client-api - run: | - apis=("parachain-api" "sidechain-api") - for api in "${apis[@]}"; do - cd "$api" - - # Check if dist and build files exist - if [ -d "dist" ] && [ -d "build" ]; then - echo "$api dist and build files exist." - else - echo "$api dist and build files do not exist. Publishing failed." - exit 1 - fi - npm publish --tag ${{inputs.release-tag}} - - echo "------------------------$api published------------------------" - cd .. - done - - - name: Stop docker containers - run: | - cd tee-worker/docker - docker compose -f docker-compose.yml -f lit-ts-api-package-build.yml stop - - - name: Collect Docker Logs - continue-on-error: true - if: always() - uses: jwalton/gh-docker-logs@v2 - with: - tail: all - dest: logs - - - name: Upload logs - if: always() - uses: actions/upload-artifact@v4 - with: - name: logs-lit-ts-api-package-build - path: logs - if-no-files-found: ignore