diff --git a/.github/actions/cached-image-pull/action.yml b/.github/actions/cached-image-pull/action.yml index e2bb9d822..351bb3e6a 100644 --- a/.github/actions/cached-image-pull/action.yml +++ b/.github/actions/cached-image-pull/action.yml @@ -23,11 +23,11 @@ runs: env: CACHE_PATH: ${{ inputs.cache-directory }}${{ inputs.cache-file }}.tar run: | - echo "::set-output name=path::$CACHE_PATH" + echo "path=$CACHE_PATH" >> $GITHUB_OUTPUT - name: check image cache id: image-cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ${{ steps.image-file.outputs.path }} key: image-cache-${{ inputs.image }} diff --git a/.github/workflows/devpackpublish.yml b/.github/workflows/devpackpublish.yml index a84bf6c8e..a976dc9cc 100644 --- a/.github/workflows/devpackpublish.yml +++ b/.github/workflows/devpackpublish.yml @@ -16,21 +16,22 @@ jobs: runs-on: ubuntu-latest if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && github.repository == 'kiltprotocol/sdk-js'" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: # fetch-depth 0 and token needed to push changes on the package.json files back. fetch-depth: 0 token: ${{ secrets.REPO_ACCESS_TOKEN }} - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v3 with: node-version: 14 + cache: 'yarn' - name: Install dependencies run: yarn install --immutable - name: Bump prerelease version of root package run: npm version --no-git-tag-version prerelease - name: Get current package version id: package_version - run: echo "::set-output name=package_version::$(node -pe "require('./package.json').version")" + run: echo "package_version=$(node -pe "require('./package.json').version")" >> $GITHUB_OUTPUT - name: Set all other packages to same version env: PACKAGE_VERSION: ${{ steps.package_version.outputs.package_version }} diff --git a/.github/workflows/docpublish.yml b/.github/workflows/docpublish.yml index 0e2d9f5e6..6d075f62a 100644 --- a/.github/workflows/docpublish.yml +++ b/.github/workflows/docpublish.yml @@ -10,9 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly. - with: - persist-credentials: false + uses: actions/checkout@v3 - name: Install and Build run: | @@ -20,8 +18,7 @@ jobs: yarn build:docs - name: Deploy - uses: JamesIves/github-pages-deploy-action@releases/v3 + uses: JamesIves/github-pages-deploy-action@v4 with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: gh-pages # The branch the action should deploy to. - FOLDER: docs/api # The folder the action should deploy to. + branch: gh-pages # The branch the action should deploy to. + folder: docs/api # The folder the action should deploy to. diff --git a/.github/workflows/npmpublish-rc.yml b/.github/workflows/npmpublish-rc.yml index ece3e6a33..c53519c74 100644 --- a/.github/workflows/npmpublish-rc.yml +++ b/.github/workflows/npmpublish-rc.yml @@ -6,10 +6,11 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: 14 + cache: 'yarn' - run: yarn install --immutable - run: yarn build - run: yarn test:ci @@ -18,10 +19,11 @@ jobs: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: 14 + cache: 'yarn' - name: Install dependencies run: yarn install --immutable - name: Build packages @@ -30,7 +32,7 @@ jobs: run: yarn run bundle - name: Get current package version id: package_version - run: echo "::set-output name=package_version::$(node -pe "require('./package.json').version")" + run: echo "package_version=$(node -pe "require('./package.json').version")" >> $GITHUB_OUTPUT - name: Publish to NPM run: yarn run publish --tag rc env: diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml index 7957abf81..7f3123b81 100644 --- a/.github/workflows/npmpublish.yml +++ b/.github/workflows/npmpublish.yml @@ -6,10 +6,11 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: 14 + cache: 'yarn' - run: yarn install --immutable - run: yarn build - run: yarn test:ci @@ -18,10 +19,11 @@ jobs: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: 14 + cache: 'yarn' - name: Install dependencies run: yarn install --immutable - name: Build packages @@ -30,7 +32,7 @@ jobs: run: yarn run bundle - name: Get current package version id: package_version - run: echo "::set-output name=package_version::$(node -pe "require('./package.json').version")" + run: echo "package_version=$(node -pe "require('./package.json').version")" >> $GITHUB_OUTPUT - name: Publish to NPM run: yarn run publish --tag latest env: diff --git a/.github/workflows/semantic-pull-request.yml b/.github/workflows/semantic-pull-request.yml index 06d2d32d3..c4ba39bf9 100644 --- a/.github/workflows/semantic-pull-request.yml +++ b/.github/workflows/semantic-pull-request.yml @@ -11,6 +11,6 @@ jobs: validate: runs-on: ubuntu-latest steps: - - uses: amannn/action-semantic-pull-request@v4 + - uses: amannn/action-semantic-pull-request@v5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test-node-candidate.yml b/.github/workflows/test-node-candidate.yml index 742e97a92..6276ffd4c 100644 --- a/.github/workflows/test-node-candidate.yml +++ b/.github/workflows/test-node-candidate.yml @@ -18,7 +18,7 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Use Node.js 14 + - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: 14 @@ -30,7 +30,7 @@ jobs: - name: zip build run: zip -r build.zip . - name: upload build - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: build path: build.zip @@ -51,22 +51,20 @@ jobs: needs: cache_imgs steps: - - name: Log out node version - run: node --version - - name: Use Node.js 14 + - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: 14 - name: Log out node version run: node --version - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: build - name: unzip run: unzip build.zip -d . - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -99,11 +97,11 @@ jobs: needs: build steps: - - name: Use Node.js 14 + - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: 14 - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: build - name: unzip @@ -111,7 +109,7 @@ jobs: - name: yarn bundle run: yarn bundle - name: upload bundle artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: checked-nonmin-bundle path: packages/sdk-js/dist/sdk-js.umd.js @@ -122,21 +120,21 @@ jobs: needs: [cache_imgs, bundle_cache] steps: - - name: Use Node.js 14 - uses: actions/setup-node@v3 + - uses: actions/setup-node@v3 with: - node-version: 14 - - uses: actions/download-artifact@v2 + node-version: '16.x' + - uses: actions/download-artifact@v3 with: name: build - name: unzip run: unzip build.zip -d . - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: checked-nonmin-bundle path: packages/sdk-js/dist + - run: basename /packages/sdk-js/dist/ - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -145,10 +143,6 @@ jobs: - name: Login to Amazon ECR id: login-ecr uses: aws-actions/amazon-ecr-login@v1 - - uses: actions/setup-node@v2 - with: - node-version: '16.x' - - run: basename /packages/sdk-js/dist/ - name: pull node image env: ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} diff --git a/.github/workflows/tests-polkadot-deps.yml b/.github/workflows/tests-polkadot-deps.yml index fe4494ed0..b83dd2869 100644 --- a/.github/workflows/tests-polkadot-deps.yml +++ b/.github/workflows/tests-polkadot-deps.yml @@ -16,24 +16,14 @@ jobs: node-version: [14.x, 16.x] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: ref: master - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn config get cacheFolder)" - - uses: actions/cache@v2 - id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-${{ matrix.node-version }}-updated-dependencies - restore-keys: | - ${{ runner.os }}-${{ matrix.node-version }}-updated-dependencies - ${{ runner.os }}-${{ matrix.node-version }}-yarn- + cache: 'yarn' - name: delete yarn.lock run: rm -f yarn.lock @@ -57,7 +47,7 @@ jobs: - name: zip build run: zip -r build.zip . - name: upload build - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: build-${{ matrix.node-version }} path: build.zip @@ -77,7 +67,7 @@ jobs: continue-on-error: ${{ matrix.required == 'optional' }} steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: build-${{ matrix.node-version }} - name: unzip @@ -101,14 +91,14 @@ jobs: continue-on-error: ${{ matrix.required == 'optional' }} steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: build-14.x - name: unzip run: unzip build.zip -d . - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d0edfbeac..3b83fb704 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,7 +13,8 @@ on: - 'Dockerfile' - 'docker-compose.yml' - 'dc.build.node.yml' - - '.github/workflows/*publish.yml' + - '.github/**' + - '!.github/workflows/tests.yml' pull_request: branches: - develop @@ -37,7 +38,7 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Use Node.js 14 + - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: 14 @@ -49,7 +50,7 @@ jobs: - name: zip build run: zip -r build.zip . - name: upload build - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: build path: build.zip @@ -59,11 +60,11 @@ jobs: needs: build steps: - - name: Use Node.js 14 + - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: 14 - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: build - name: unzip @@ -92,7 +93,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: build - name: unzip @@ -123,22 +124,20 @@ jobs: continue-on-error: ${{ matrix.required == 'optional' }} steps: - - name: Log out node version - run: node --version - - name: Use Node.js 14 + - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: 14 - name: Log out node version run: node --version - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: build - name: unzip run: unzip build.zip -d . - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -171,11 +170,11 @@ jobs: needs: build steps: - - name: Use Node.js 14 + - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: 14 - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: build - name: unzip @@ -183,7 +182,7 @@ jobs: - name: yarn bundle run: yarn bundle - name: upload bundle artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: checked-nonmin-bundle path: packages/sdk-js/dist/sdk-js.umd.js @@ -202,21 +201,21 @@ jobs: continue-on-error: ${{ matrix.required == 'optional' }} steps: - - name: Use Node.js 14 - uses: actions/setup-node@v3 + - uses: actions/setup-node@v3 with: - node-version: 14 - - uses: actions/download-artifact@v2 + node-version: '16.x' + - uses: actions/download-artifact@v3 with: name: build - name: unzip run: unzip build.zip -d . - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: checked-nonmin-bundle path: packages/sdk-js/dist + - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -225,9 +224,6 @@ jobs: - name: Login to Amazon ECR id: login-ecr uses: aws-actions/amazon-ecr-login@v1 - - uses: actions/setup-node@v2 - with: - node-version: '16.x' - run: basename /packages/sdk-js/dist/ - name: pull node image env: