diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index b907787..818a171 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -8,9 +8,8 @@ on: - '!main' # excludes main jobs: - release: + lint: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v6 - uses: actions/setup-node@v6 @@ -19,11 +18,26 @@ 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 + + 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: 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