diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml index 90b29a576..25d3fa81b 100644 --- a/.github/workflows/canary.yml +++ b/.github/workflows/canary.yml @@ -24,6 +24,11 @@ jobs: - name: 'Setup lerna@6.6.1' run: yarn global add lerna@6.6.1 --ignore-engines + - name: Set up Git user + run: | + git config user.name "${{ github.actor }}" + git config user.email "${{ github.actor }}@users.noreply.github.com" + - name: Build dependencies run: | node etc/bootstrapEnv @@ -35,13 +40,14 @@ jobs: env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: 'Commit ibcTokenMetadata.json if changed' + run: | + git diff --exit-code -- packages/sdk-ui-ts/src/services/ibc/ibcTokenMetadata.json || (git add packages/sdk-ui-ts/src/services/ibc/ibcTokenMetadata.json && git commit -m "Automatically update ibcTokenMetadata.json") + - name: Version and publish env: GH_TOKEN: ${{ secrets.GH_TOKEN }} run: | - git config user.name "${{ github.actor }}" - git config user.email "${{ github.actor}}@users.noreply.github.com" - lerna version prerelease --preid dev --force-git-tag --no-changelog --yes lerna publish from-git --force-git-tag --dist-tag dev --yes --summary-file diff --git a/.github/workflows/dev.yaml b/.github/workflows/dev.yaml index c4580baf7..2e1a6d374 100644 --- a/.github/workflows/dev.yaml +++ b/.github/workflows/dev.yaml @@ -24,6 +24,11 @@ jobs: - name: 'Setup lerna@6.6.1' run: yarn global add lerna@6.6.1 --ignore-engines + - name: Set up Git user + run: | + git config user.name "${{ github.actor }}" + git config user.email "${{ github.actor }}@users.noreply.github.com" + - name: Build dependencies run: | node etc/bootstrapEnv @@ -35,13 +40,14 @@ jobs: env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: 'Commit ibcTokenMetadata.json if changed' + run: | + git diff --exit-code -- packages/sdk-ui-ts/src/services/ibc/ibcTokenMetadata.json || (git add packages/sdk-ui-ts/src/services/ibc/ibcTokenMetadata.json && git commit -m "Automatically update ibcTokenMetadata.json") + - name: Version and publish env: GH_TOKEN: ${{ secrets.GH_TOKEN }} run: | - git config user.name "${{ github.actor }}" - git config user.email "${{ github.actor}}@users.noreply.github.com" - lerna version prerelease --preid beta --force-git-tag --no-changelog --yes lerna publish from-git --force-git-tag --dist-tag next --yes --summary-file diff --git a/.github/workflows/stable.yaml b/.github/workflows/stable.yaml index 4b1579ac7..656c2bbcc 100644 --- a/.github/workflows/stable.yaml +++ b/.github/workflows/stable.yaml @@ -24,6 +24,11 @@ jobs: - name: 'Setup lerna@6.6.1' run: yarn global add lerna@6.6.1 --ignore-engines + - name: Set up Git user + run: | + git config user.name "${{ github.actor }}" + git config user.email "${{ github.actor }}@users.noreply.github.com" + - name: Build dependencies run: | node etc/bootstrapEnv @@ -35,13 +40,14 @@ jobs: env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: 'Commit ibcTokenMetadata.json if changed' + run: | + git diff --exit-code -- packages/sdk-ui-ts/src/services/ibc/ibcTokenMetadata.json || (git add packages/sdk-ui-ts/src/services/ibc/ibcTokenMetadata.json && git commit -m "Automatically update ibcTokenMetadata.json") + - name: Version and publish env: GH_TOKEN: ${{ secrets.GH_TOKEN }} run: | - git config user.name "${{ github.actor }}" - git config user.email "${{ github.actor}}@users.noreply.github.com" - lerna version patch --conventional-commits --conventional-graduate --force-git-tag --yes lerna publish from-git --force-git-tag --dist-tag latest --yes --summary-file diff --git a/packages/sdk-ui-ts/package.json b/packages/sdk-ui-ts/package.json index 27e77892a..a592b9b80 100644 --- a/packages/sdk-ui-ts/package.json +++ b/packages/sdk-ui-ts/package.json @@ -18,7 +18,7 @@ }, "scripts": { "postinstall": "link-module-alias", - "build": "tsc --build tsconfig.build.json && tsc --build tsconfig.build.esm.json && yarn build:post && link-module-alias && yarn copy-files", + "build": "tsc --build tsconfig.build.json && tsc --build tsconfig.build.esm.json && yarn build:post && link-module-alias && yarn copy-files && yarn get-ibc-tokens", "build:watch": "tsc --build -w tsconfig.build.json && tsc -w --build tsconfig.build.esm.json && yarn build:post && link-module-alias", "build:post": "shx cp ../../etc/stub/package.json.stub dist/cjs/package.json && shx cp ../../etc/stub/package.esm.json.stub dist/esm/package.json", "clean": "tsc --build tsconfig.build.json --clean && tsc --build tsconfig.build.esm.json --clean && shx rm -rf coverage *.log junit.xml dist && jest --clearCache && shx mkdir -p dist",