From dc35fe99327d95cf22fd07006803b2473f5c651e Mon Sep 17 00:00:00 2001 From: Peter Savchenko Date: Sun, 8 Feb 2026 13:55:01 +0300 Subject: [PATCH 1/5] Modernize CI workflow and split publish job Upgrade CI to use Ubuntu 22.04 and newer action versions, update checkout/setup-node, and enable Corepack with Yarn v4.5.1. Replace manual yarn cache restore with setup-node's cache option, fix a typo in the install step name, and standardize step names (Lint, Test, Build). Extract publishing into a dedicated job that runs on main and publishes two @hawk.so workspaces using NODE_AUTH_TOKEN. --- .github/workflows/main.yml | 69 ++++++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 29 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b906926..823d85f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,27 +3,17 @@ name: CI on: push jobs: - lint-test-build-publish: - runs-on: ubuntu-20.04 + check-lint-test-build: + runs-on: ubuntu-22.04 steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v6 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v6 with: node-version-file: .nvmrc - registry-url: 'https://registry.npmjs.org' - scope: '@codexteam' - - - name: Restore Yarn cache - uses: actions/cache@v3 - id: yarn-cache - with: - path: .yarn/cache - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + cache: 'yarn' - name: Enable Corepack run: corepack enable @@ -31,31 +21,52 @@ jobs: - name: Use specified Yarn version run: corepack prepare yarn@4.5.1 --activate - - name: Install dependecies + - name: Install dependencies run: yarn install - - name: Test Eslint + - name: Lint run: yarn lint - - name: Run unit tests + - name: Test run: yarn test - - name: Build library + - name: Build run: yarn build - - name: Publish library - if: ${{ github.ref == 'refs/heads/main' }} - run: yarn publish --access=public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - notify: - needs: lint-test-build-publish + publish: + needs: ci if: github.ref == 'refs/heads/main' - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: 'yarn' + registry-url: 'https://registry.npmjs.org' + scope: '@hawk.so' + + - name: Enable Corepack + run: corepack enable + + - name: Use specified Yarn version + run: corepack prepare yarn@4.5.1 --activate + + - name: Install dependencies + run: yarn install + + - name: Build + run: yarn build + + - name: Publish + run: | + yarn workspace @hawk.so/utils exec npm publish --access public + yarn workspace @hawk.so/github-sdk exec npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Get package info id: package From b790de64adcb8b42c525392de4e297aac95420c3 Mon Sep 17 00:00:00 2001 From: Peter Savchenko Date: Sun, 8 Feb 2026 14:00:46 +0300 Subject: [PATCH 2/5] Update main.yml --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 823d85f..beb5db0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,8 @@ name: CI -on: push +on: + push: + pull_request: jobs: check-lint-test-build: From eee63608bceb13d31960a257012773b024e1bc29 Mon Sep 17 00:00:00 2001 From: Peter Savchenko Date: Sun, 8 Feb 2026 14:05:09 +0300 Subject: [PATCH 3/5] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index beb5db0..5969157 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,7 +36,7 @@ jobs: run: yarn build publish: - needs: ci + needs: check-lint-test-build if: github.ref == 'refs/heads/main' runs-on: ubuntu-22.04 steps: From d1c841648bd17bce12743ec4e4545ccd8b490192 Mon Sep 17 00:00:00 2001 From: Peter Savchenko Date: Sun, 8 Feb 2026 14:10:54 +0300 Subject: [PATCH 4/5] Update main.yml --- .github/workflows/main.yml | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5969157..b216caa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,16 +15,12 @@ jobs: uses: actions/setup-node@v6 with: node-version-file: .nvmrc - cache: 'yarn' - - name: Enable Corepack - run: corepack enable - - - name: Use specified Yarn version - run: corepack prepare yarn@4.5.1 --activate - - - name: Install dependencies - run: yarn install + - name: Enable Corepack and install dependencies + run: | + corepack enable + corepack prepare yarn@4.5.1 --activate + yarn install - name: Lint run: yarn lint @@ -47,18 +43,14 @@ jobs: uses: actions/setup-node@v4 with: node-version-file: .nvmrc - cache: 'yarn' registry-url: 'https://registry.npmjs.org' scope: '@hawk.so' - - name: Enable Corepack - run: corepack enable - - - name: Use specified Yarn version - run: corepack prepare yarn@4.5.1 --activate - - - name: Install dependencies - run: yarn install + - name: Enable Corepack and install dependencies + run: | + corepack enable + corepack prepare yarn@4.5.1 --activate + yarn install - name: Build run: yarn build From 036b73ed1b84d11b309791996e27a7a7a1bd44ef Mon Sep 17 00:00:00 2001 From: Peter Savchenko Date: Sun, 8 Feb 2026 14:21:08 +0300 Subject: [PATCH 5/5] Update main.yml --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b216caa..a780365 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,7 +2,6 @@ name: CI on: push: - pull_request: jobs: check-lint-test-build: