From 2d7308b61f4dbe5f3a2362cd1f70e692e14cd02c Mon Sep 17 00:00:00 2001 From: devdanco Date: Mon, 20 Nov 2023 13:02:31 +0100 Subject: [PATCH] chore: update ci --- .github/workflows/pre-release-types.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/pre-release-types.yml b/.github/workflows/pre-release-types.yml index 8868243..f08b9f7 100644 --- a/.github/workflows/pre-release-types.yml +++ b/.github/workflows/pre-release-types.yml @@ -97,12 +97,27 @@ jobs: - run: npm ci - name: Extract the latest version of type definitions + if: ${{ github.event.inputs.branch == '' }} run: | version=$(npm show @mangata-finance/type-definitions version) echo "NPM package version of mangata type definitions is $version" echo "MANGATA_TYPE_DEFINITIONS=$version" >> $GITHUB_ENV - name: Install always latest type definitions + if: ${{ github.event.inputs.branch == '' }} + run: npm i @mangata-finance/type-definitions@${{ env.MANGATA_TYPE_DEFINITIONS }} + + - name: Extract the tag version of type definitions based on branch + if: ${{ github.event.inputs.branch != '' }} + env: + INPUTS_BRANCH: ${{ github.event.inputs.branch }} + run: | + version=$(npm show @mangata-finance/type-definitions@${INPUTS_BRANCH//\//-} version) + echo "NPM package version of mangata type definitions is $version" + echo "MANGATA_TYPE_DEFINITIONS=$version" >> $GITHUB_ENV + + - name: Install always latest type definitions + if: ${{ github.event.inputs.branch != '' }} run: npm i @mangata-finance/type-definitions@${{ env.MANGATA_TYPE_DEFINITIONS }} - run: npx nx run @mangata-finance/types:generate-metadata