From a3889238efd3506e93584bdf79f776260219df48 Mon Sep 17 00:00:00 2001 From: Sean Burton Date: Thu, 2 Apr 2026 12:51:01 +0100 Subject: [PATCH 1/3] build(CI): separate lint steps --- .github/workflows/pre-release.yml | 21 ++++++++++++++++++++- .github/workflows/release.yml | 23 +++++++++++++++++++---- 2 files changed, 39 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index b907787..9be8200 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -8,7 +8,7 @@ on: - '!main' # excludes main jobs: - release: + lint: runs-on: ubuntu-latest steps: @@ -24,6 +24,25 @@ jobs: run: | npm ci npm run lint + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-node@v6 + with: + node-version: 20 + cache: 'npm' + # Path to the lock file needs to be specified explicitly as it is not in the root of the repository + cache-dependency-path: 'documentation-ui/package-lock.json' + - name: Lint and build documentation UI JS package + working-directory: documentation-ui + run: | + npm ci npm run build env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9464784..b877430 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ permissions: id-token: write jobs: - release_node: + lint_node: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 @@ -22,13 +22,28 @@ jobs: cache: 'npm' # Path to the lock file needs to be specified explicitly as it is not in the root of the repository cache-dependency-path: 'documentation-ui/package-lock.json' - - name: Lint and build documentation UI JS package + - name: Lint documentation UI JS package working-directory: documentation-ui run: | npm ci npm run lint - npm run build + build_and_release_node: + runs-on: ubuntu-latest + needs: lint_node + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-node@v6 + with: + node-version: 20 + cache: 'npm' + # Path to the lock file needs to be specified explicitly as it is not in the root of the repository + cache-dependency-path: 'documentation-ui/package-lock.json' + - name: Build documentation UI JS package + working-directory: documentation-ui + run: | + npm ci + npm run build - name: Release documentation UI JS package working-directory: documentation-ui run: | @@ -39,7 +54,7 @@ jobs: release_pypi: runs-on: ubuntu-latest - needs: release_node + needs: build_and_release_node steps: - uses: actions/checkout@v6 - name: Set up Python From b3e4a1a11214baf7c559500d470358f7b0174ddb Mon Sep 17 00:00:00 2001 From: Sean Burton Date: Thu, 2 Apr 2026 17:45:11 +0100 Subject: [PATCH 2/3] Correct step names --- .github/workflows/pre-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 9be8200..001bb96 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -19,7 +19,7 @@ jobs: cache: 'npm' # Path to the lock file needs to be specified explicitly as it is not in the root of the repository cache-dependency-path: 'documentation-ui/package-lock.json' - - name: Lint and build documentation UI JS package + - name: Lint documentation UI JS package working-directory: documentation-ui run: | npm ci @@ -39,7 +39,7 @@ jobs: cache: 'npm' # Path to the lock file needs to be specified explicitly as it is not in the root of the repository cache-dependency-path: 'documentation-ui/package-lock.json' - - name: Lint and build documentation UI JS package + - name: Build documentation UI JS package working-directory: documentation-ui run: | npm ci From 16e482bdcc777b381d1edb94500b952de28339a1 Mon Sep 17 00:00:00 2001 From: Sean Burton Date: Thu, 2 Apr 2026 17:51:23 +0100 Subject: [PATCH 3/3] Removed tokens from job they're not needed for --- .github/workflows/pre-release.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 001bb96..818a171 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -10,7 +10,6 @@ on: jobs: lint: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v6 - uses: actions/setup-node@v6 @@ -24,13 +23,9 @@ jobs: run: | npm ci npm run lint - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} build: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v6 - uses: actions/setup-node@v6