From 53552886d1a60198ff63cb57973a8fffed62e072 Mon Sep 17 00:00:00 2001 From: mikebender Date: Wed, 17 Jul 2024 13:07:30 -0400 Subject: [PATCH] ci: Add registry-url and remove cache from publish action - Just trying the same settings as publishing on web-client-ui (where it's working) - Switch actions/checkout to v4 --- .github/workflows/build-main-docs.yml | 8 +- .github/workflows/build-python-package.yml | 88 ++++++++++---------- .github/workflows/make-docs.yml | 9 +- .github/workflows/modified-plugin.yml | 4 +- .github/workflows/pre-commit.yml | 2 +- .github/workflows/publish-alpha.yml | 4 +- .github/workflows/publish-packages.yml | 4 +- .github/workflows/release-python-package.yml | 10 +-- .github/workflows/test-js-packages.yml | 2 +- .github/workflows/test-python-package.yml | 2 +- 10 files changed, 65 insertions(+), 68 deletions(-) diff --git a/.github/workflows/build-main-docs.yml b/.github/workflows/build-main-docs.yml index e8483cc37..280acf6c8 100644 --- a/.github/workflows/build-main-docs.yml +++ b/.github/workflows/build-main-docs.yml @@ -12,16 +12,16 @@ jobs: check-make-docs: runs-on: ubuntu-22.04 outputs: - files_exists: ${{ steps.check_files.outputs.files_exists }} + files_exists: ${{ steps.check_files.outputs.files_exists }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Check file existence id: check_files uses: andstor/file-existence-action@v3 with: - files: "plugins/${{ inputs.package }}/make_docs.py" + files: 'plugins/${{ inputs.package }}/make_docs.py' build-plugin: if: needs.check-make-docs.outputs.files_exists == 'true' @@ -37,5 +37,3 @@ jobs: with: package: ${{ inputs.package }} version: 'main' - - diff --git a/.github/workflows/build-python-package.yml b/.github/workflows/build-python-package.yml index f75dda9a2..de4d245ca 100644 --- a/.github/workflows/build-python-package.yml +++ b/.github/workflows/build-python-package.yml @@ -8,47 +8,47 @@ on: type: string jobs: - build-python-package: - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Check file existence - id: check_files - uses: andstor/file-existence-action@v3 - with: - files: "plugins/${{ inputs.package }}/src/js/package.json" - - - name: Setup Node - if: steps.check_files.outputs.files_exists == 'true' - uses: actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Install npm dependencies - if: steps.check_files.outputs.files_exists == 'true' - run: npm ci - - - name: Build npm packages - if: steps.check_files.outputs.files_exists == 'true' - run: npm run build -- --scope "@deephaven/js-plugin-${{ inputs.package }}" - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.x' - - - name: Install build dependencies - run: python -m pip install --upgrade setuptools wheel build - - - name: Build wheel - run: python -m build --wheel --sdist plugins/${{ inputs.package }} - - - name: Upload dist - uses: actions/upload-artifact@v3 - with: - name: dist-${{ inputs.package }} - path: plugins/${{ inputs.package }}/dist/ - if-no-files-found: error \ No newline at end of file + build-python-package: + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Check file existence + id: check_files + uses: andstor/file-existence-action@v3 + with: + files: 'plugins/${{ inputs.package }}/src/js/package.json' + + - name: Setup Node + if: steps.check_files.outputs.files_exists == 'true' + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install npm dependencies + if: steps.check_files.outputs.files_exists == 'true' + run: npm ci + + - name: Build npm packages + if: steps.check_files.outputs.files_exists == 'true' + run: npm run build -- --scope "@deephaven/js-plugin-${{ inputs.package }}" + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + + - name: Install build dependencies + run: python -m pip install --upgrade setuptools wheel build + + - name: Build wheel + run: python -m build --wheel --sdist plugins/${{ inputs.package }} + + - name: Upload dist + uses: actions/upload-artifact@v3 + with: + name: dist-${{ inputs.package }} + path: plugins/${{ inputs.package }}/dist/ + if-no-files-found: error diff --git a/.github/workflows/make-docs.yml b/.github/workflows/make-docs.yml index 2619546a5..5458934d8 100644 --- a/.github/workflows/make-docs.yml +++ b/.github/workflows/make-docs.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 # assume that the dist artifact is already available from calling build-python-package.yml before this workflow - name: Download dist @@ -37,10 +37,10 @@ jobs: run: | sudo apt-get update sudo apt-get install -y rclone - + mkdir -p $HOME/.config mkdir -p $HOME/.config/rclone - + cat << EOF > $HOME/.config/rclone/rclone.conf [plugindocs] type = s3 @@ -51,7 +51,6 @@ jobs: no_check_bucket = true acl = private EOF - - name: Sync docs - run: rclone sync plugins/${{ inputs.package }}/docs/build/markdown/ plugindocs:website/deephaven/deephaven-plugins/${{ inputs.package }}/${{ inputs.version }}/ \ No newline at end of file + run: rclone sync plugins/${{ inputs.package }}/docs/build/markdown/ plugindocs:website/deephaven/deephaven-plugins/${{ inputs.package }}/${{ inputs.version }}/ diff --git a/.github/workflows/modified-plugin.yml b/.github/workflows/modified-plugin.yml index fd6c0cb47..9a9d9a0e3 100644 --- a/.github/workflows/modified-plugin.yml +++ b/.github/workflows/modified-plugin.yml @@ -27,7 +27,7 @@ jobs: packages: ${{ steps.filter.outputs.changes }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Filter paths uses: dorny/paths-filter@v2 id: filter @@ -114,4 +114,4 @@ jobs: uses: ./.github/workflows/build-main-docs.yml secrets: inherit with: - package: ${{ matrix.package }} \ No newline at end of file + package: ${{ matrix.package }} diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index d1747b5b4..3aa173c63 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -6,6 +6,6 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v3 - uses: pre-commit/action@v3.0.0 diff --git a/.github/workflows/publish-alpha.yml b/.github/workflows/publish-alpha.yml index ae5634f37..893153748 100644 --- a/.github/workflows/publish-alpha.yml +++ b/.github/workflows/publish-alpha.yml @@ -18,7 +18,7 @@ jobs: packages: write id-token: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: '0' # Need the history to properly select the canary version number ref: ${{ github.event.inputs.ref }} @@ -26,7 +26,7 @@ jobs: uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' - cache: 'npm' + registry-url: 'https://registry.npmjs.org' - name: Install dependencies run: npm ci - name: Build packages diff --git a/.github/workflows/publish-packages.yml b/.github/workflows/publish-packages.yml index 79f201716..f938a3183 100644 --- a/.github/workflows/publish-packages.yml +++ b/.github/workflows/publish-packages.yml @@ -12,14 +12,14 @@ jobs: id-token: write steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.ref }} - name: Setup Node uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' - cache: 'npm' + registry-url: 'https://registry.npmjs.org' - name: Install dependencies run: npm ci - name: Build production diff --git a/.github/workflows/release-python-package.yml b/.github/workflows/release-python-package.yml index 512f51dd3..b49e842ea 100644 --- a/.github/workflows/release-python-package.yml +++ b/.github/workflows/release-python-package.yml @@ -28,7 +28,7 @@ jobs: version: ${{ steps.extract_version.outputs.version }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download dist uses: actions/download-artifact@v3 @@ -60,20 +60,20 @@ jobs: check-make-docs: runs-on: ubuntu-22.04 outputs: - files_exists: ${{ steps.check_files.outputs.files_exists }} + files_exists: ${{ steps.check_files.outputs.files_exists }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Check file existence id: check_files uses: andstor/file-existence-action@v3 with: - files: "plugins/${{ inputs.package }}/make_docs.py" + files: 'plugins/${{ inputs.package }}/make_docs.py' release-docs: if: needs.check-make-docs.outputs.files_exists == 'true' - needs: + needs: - release - check-make-docs uses: ./.github/workflows/make-docs.yml diff --git a/.github/workflows/test-js-packages.yml b/.github/workflows/test-js-packages.yml index 6625b2e4e..e9ef6a531 100644 --- a/.github/workflows/test-js-packages.yml +++ b/.github/workflows/test-js-packages.yml @@ -12,7 +12,7 @@ jobs: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js uses: actions/setup-node@v4 diff --git a/.github/workflows/test-python-package.yml b/.github/workflows/test-python-package.yml index 891b088ee..268c69d33 100644 --- a/.github/workflows/test-python-package.yml +++ b/.github/workflows/test-python-package.yml @@ -15,7 +15,7 @@ jobs: python: ['3.8', '3.9', '3.10', '3.11', '3.12'] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Python uses: actions/setup-python@v4