Skip to content

Commit

Permalink
ci: Add registry-url and remove cache from publish action
Browse files Browse the repository at this point in the history
- Just trying the same settings as publishing on web-client-ui (where it's working)
- Switch actions/checkout to v4
  • Loading branch information
mofojed committed Jul 17, 2024
1 parent f10b071 commit 5355288
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 68 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/build-main-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -37,5 +37,3 @@ jobs:
with:
package: ${{ inputs.package }}
version: 'main'


88 changes: 44 additions & 44 deletions .github/workflows/build-python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
9 changes: 4 additions & 5 deletions .github/workflows/make-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 }}/
run: rclone sync plugins/${{ inputs.package }}/docs/build/markdown/ plugindocs:website/deephaven/deephaven-plugins/${{ inputs.package }}/${{ inputs.version }}/
4 changes: 2 additions & 2 deletions .github/workflows/modified-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -114,4 +114,4 @@ jobs:
uses: ./.github/workflows/build-main-docs.yml
secrets: inherit
with:
package: ${{ matrix.package }}
package: ${{ matrix.package }}
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions .github/workflows/publish-alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ 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 }}
- 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 packages
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release-python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-js-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5355288

Please sign in to comment.