From c4aa273cb613530b2de0db002ca0cc1bb2cf0cc7 Mon Sep 17 00:00:00 2001 From: Timo Glastra Date: Tue, 30 Jan 2024 15:19:47 +0700 Subject: [PATCH 1/3] chore: some updates to ci Signed-off-by: Timo Glastra --- .github/actions/setup-node/action.yml | 34 -------------------- .github/workflows/continuous-deployment.yml | 8 +++-- .github/workflows/continuous-integration.yml | 26 ++++++++++----- 3 files changed, 23 insertions(+), 45 deletions(-) delete mode 100644 .github/actions/setup-node/action.yml diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml deleted file mode 100644 index 27fe8d10..00000000 --- a/.github/actions/setup-node/action.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Setup NodeJS -description: Setup NodeJS with caching -author: 'timo@animo.id' - -inputs: - node-version: - description: Node version to use - required: true - -runs: - using: composite - steps: - - name: Get yarn cache directory path - id: yarn-cache-dir-path - shell: bash - run: echo "::set-output name=dir::$(yarn cache dir)" - - - 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 }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - - name: Setup node v${{ inputs.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ inputs.node-version }} - registry-url: 'https://registry.npmjs.org/' - -branding: - icon: scissors - color: purple diff --git a/.github/workflows/continuous-deployment.yml b/.github/workflows/continuous-deployment.yml index 90b855b8..c2bcccfa 100644 --- a/.github/workflows/continuous-deployment.yml +++ b/.github/workflows/continuous-deployment.yml @@ -14,16 +14,18 @@ jobs: steps: # Initiate release process if release was created - name: Checkout aries-framework-javascript-ext - uses: actions/checkout@v2 + uses: actions/checkout@v4 # Some packages need indy-sdk for node as part of yarn install - name: Setup Libindy uses: ./.github/actions/setup-libindy - - name: Setup NodeJS - uses: ./.github/actions/setup-node + - name: Setup node v16 + uses: actions/setup-node@v4 with: node-version: 16 + registry-url: 'https://registry.npmjs.org/' + cache: yarn - name: Install dependencies run: yarn install --frozen-lockfile diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 7679271c..5ddbfcff 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -51,10 +51,12 @@ jobs: - name: Setup Libindy uses: ./.github/actions/setup-libindy - - name: Setup NodeJS - uses: ./.github/actions/setup-node + - name: Setup node v16 + uses: actions/setup-node@v4 with: node-version: 16 + registry-url: 'https://registry.npmjs.org/' + cache: yarn - name: Install dependencies run: yarn install @@ -127,10 +129,12 @@ jobs: - name: Setup Libindy uses: ./.github/actions/setup-libindy - - name: Setup NodeJS - uses: ./.github/actions/setup-node + - name: Setup node v16 + uses: actions/setup-node@v4 with: node-version: 16 + registry-url: 'https://registry.npmjs.org/' + cache: yarn - name: Install dependencies run: yarn install @@ -161,22 +165,28 @@ jobs: # Initiate release process if release was created - name: Checkout aries-framework-javascript-ext - uses: actions/checkout@v2 + uses: actions/checkout@v4 if: ${{ steps.release-please.outputs.release_created }} + # Some packages need indy-sdk for node as part of yarn install - name: Setup Libindy uses: ./.github/actions/setup-libindy if: ${{ steps.release-please.outputs.release_created }} - - name: Setup NodeJS - uses: ./.github/actions/setup-node + + - name: Setup node v16 + uses: actions/setup-node@v4 with: node-version: 16 + registry-url: 'https://registry.npmjs.org/' + cache: yarn if: ${{ steps.release-please.outputs.release_created }} + - name: Install dependencies run: yarn install --frozen-lockfile if: ${{ steps.release-please.outputs.release_created }} + - name: Release to NPM run: npm publish ./packages/${{ matrix.package }} env: - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH }} if: ${{ steps.release-please.outputs.release_created }} From 4d5375116285e626fa216b6eb1aefacd7d35f44d Mon Sep 17 00:00:00 2001 From: Timo Glastra Date: Tue, 30 Jan 2024 15:22:40 +0700 Subject: [PATCH 2/3] remove husky Signed-off-by: Timo Glastra --- .husky/pre-push | 1 - package.json | 4 +--- yarn.lock | 5 ----- 3 files changed, 1 insertion(+), 9 deletions(-) delete mode 100755 .husky/pre-push diff --git a/.husky/pre-push b/.husky/pre-push deleted file mode 100755 index b969aaaf..00000000 --- a/.husky/pre-push +++ /dev/null @@ -1 +0,0 @@ -yarn validate \ No newline at end of file diff --git a/package.json b/package.json index bf299d0d..2ec10970 100644 --- a/package.json +++ b/package.json @@ -51,8 +51,7 @@ "check-format": "yarn prettier --list-different", "test": "jest", "lint": "eslint --ignore-path .gitignore .", - "validate": "yarn lint && yarn check-types && yarn check-format", - "prepare": "husky install" + "validate": "yarn lint && yarn check-types && yarn check-format" }, "devDependencies": { "@types/eslint": "^8.40.2", @@ -66,7 +65,6 @@ "eslint-import-resolver-typescript": "^3.5.5", "eslint-plugin-import": "^2.27.5", "eslint-plugin-prettier": "^4.2.1", - "husky": "^8.0.3", "jest": "^29.5.0", "prettier": "^2.8.8", "ts-jest": "^29.1.0", diff --git a/yarn.lock b/yarn.lock index 07eedfe5..d50f0d3c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4936,11 +4936,6 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" -husky@^8.0.3: - version "8.0.3" - resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.3.tgz#4936d7212e46d1dea28fef29bb3a108872cd9184" - integrity sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg== - iconv-lite@0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" From a53f02898e513f53c645d874e71e2d552386c41a Mon Sep 17 00:00:00 2001 From: Timo Glastra Date: Tue, 30 Jan 2024 21:39:41 +0700 Subject: [PATCH 3/3] fix Signed-off-by: Timo Glastra --- .github/workflows/continuous-integration.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 5ddbfcff..200176fb 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -92,10 +92,12 @@ jobs: with: seed: ${TEST_AGENT_PUBLIC_DID_SEED} - - name: Setup NodeJS - uses: ./.github/actions/setup-node + - name: Setup node ${{ matrix.node-version }} + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} + registry-url: 'https://registry.npmjs.org/' + cache: yarn - name: Install dependencies run: yarn install