From b1b1c6bac82126bacd998e58f6f6b86bbc07da5e Mon Sep 17 00:00:00 2001 From: Hugh Sorby Date: Thu, 24 Oct 2024 16:13:12 +1300 Subject: [PATCH 1/4] Make corrections to package.json for libcellml.js. --- src/bindings/javascript/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/bindings/javascript/CMakeLists.txt b/src/bindings/javascript/CMakeLists.txt index 86e79547fa..9fdd3e1791 100644 --- a/src/bindings/javascript/CMakeLists.txt +++ b/src/bindings/javascript/CMakeLists.txt @@ -71,13 +71,12 @@ set(_PACKAGE_JSON "\{ \"version\": \"${PROJECT_VERSION}${PROJECT_DEVELOPER_VERSION}\", \"repository\": \{ \"type\": \"git\", - \"url\": \"https://github.com/cellml/libcellml.git\" + \"url\": \"git+https://github.com/cellml/libcellml.git\" }, \"description\": \"libcellml.js javascript web assembly for libCellML.\", \"main\": \"libcellml.js\", \"files\": [\"libcellml.common.js\", \"libcellml.common.wasm\", \"libcellml.js\", \"libcellml.wasm\", \"README.md\", \"vue-app-with-libcellml.png\"], \"author\": \"libCellML Developers \", - \"repository\": \"https://github.com/cellml/libcellml\", \"license\": \"Apache-2.0\" } ") From 912522ff1e51b605d2e97575cf6673ebe3b7c7c0 Mon Sep 17 00:00:00 2001 From: Hugh Sorby Date: Thu, 24 Oct 2024 16:26:07 +1300 Subject: [PATCH 2/4] Use pypa/gh-action-pypi-publish action for publishing libCellML wheels. --- .github/workflows/deploy-on-release.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy-on-release.yml b/.github/workflows/deploy-on-release.yml index 7697388d0a..5a1b59f393 100644 --- a/.github/workflows/deploy-on-release.yml +++ b/.github/workflows/deploy-on-release.yml @@ -364,14 +364,14 @@ jobs: - name: Publish Python wheels if: needs.setup-jobs.outputs.binaries-destination == 'Publish' - shell: bash env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - python -m pip install twine - twine upload --skip-existing ./wheelhouse/*.whl - + name: pypi + url: https://pypi.org/p/libcellml + permissions: + id-token: write + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: ./wheelhouse/ emscripten: needs: setup-jobs From 972e3f1bbf0cfdd47fc42bf3829a1ea20adf186c Mon Sep 17 00:00:00 2001 From: Hugh Sorby Date: Fri, 25 Oct 2024 13:59:01 +1300 Subject: [PATCH 3/4] Set the same environment for all cibuildwhhel deployment builds. --- .github/workflows/deploy-on-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-on-release.yml b/.github/workflows/deploy-on-release.yml index 5a1b59f393..347f56f18c 100644 --- a/.github/workflows/deploy-on-release.yml +++ b/.github/workflows/deploy-on-release.yml @@ -345,8 +345,8 @@ jobs: CIBW_TEST_SKIP: "*_arm64" CIBW_BEFORE_ALL_LINUX: yum install -y libxml2-devel || (apk add libxml2-dev && rm /usr/lib/cmake/libxml2/libxml2-config.cmake) CIBW_BEFORE_ALL_WINDOWS: cd src/bindings/python && cmake -S wheel_dependencies -B build-wheel_dependencies -G Ninja && cd build-wheel_dependencies && ninja - CIBW_ENVIRONMENT: LIBCELLML_VERSION_TAG=${{ steps.setup.outputs.tag }} - CIBW_ENVIRONMENT_MACOS: > + CIBW_ENVIRONMENT: > + LIBCELLML_VERSION_TAG=${{ steps.setup.outputs.tag }} MACOSX_DEPLOYMENT_TARGET=${{ steps.setup.outputs.macos_deployment_target }} CIBW_REPAIR_WHEEL_COMMAND_MACOS: "" CIBW_BEFORE_BUILD_LINUX: pip install renamewheel From 04f4b76c4bde71df3ce55d0a1c4affe07bf6b9aa Mon Sep 17 00:00:00 2001 From: Hugh Sorby Date: Fri, 25 Oct 2024 17:11:14 +1300 Subject: [PATCH 4/4] Use JS-DevTools/npm-publish to publish libcellml.js. --- .github/workflows/deploy-on-release.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy-on-release.yml b/.github/workflows/deploy-on-release.yml index 347f56f18c..fd9f382840 100644 --- a/.github/workflows/deploy-on-release.yml +++ b/.github/workflows/deploy-on-release.yml @@ -446,9 +446,7 @@ jobs: - name: Publish libcellml.js if: needs.setup-jobs.outputs.binaries-destination == 'Publish' - shell: bash - env: - NPM_TOKEN: ${{secrets.NPM_TOKEN}} - run: | - cd build-libcellml-release/src/bindings/javascript - npm publish --access public + uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} + package: build-libcellml-release/src/bindings/javascript