From 6ce36c23c00f770adedc35406f3e5c29badbbef3 Mon Sep 17 00:00:00 2001 From: Andreas Fehlner Date: Sat, 13 Jul 2024 16:35:53 +0200 Subject: [PATCH] update --- .github/workflows/create_release.yml | 9 +++++++-- .github/workflows/manylinux/entrypoint.sh | 8 ++++++++ .github/workflows/release_linux_x86_64.yml | 4 +--- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 951f0ff68a4..3a5f7f43752 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -75,8 +75,13 @@ jobs: if: always() && (needs.call-workflow-ubuntu_x86.result == 'success') || (needs.call-workflow-ubuntu_aarch64.result == 'success') || ((needs.call-workflow-mac.result == 'success')) environment: - name: pypi # TODO: Does not yet exist, has to be created, see here: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ - url: https://pypi.org/p/onnx + name: testpypi # TODO: Does not yet exist, has to be created, see here: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ + url: https://test.pypi.org/p/af-test-onnx-sigstore + #url: https://pypi.org/p/onnx + + #environment: + # name: pypi # TODO: Does not yet exist, has to be created, see here: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ + # url: https://pypi.org/p/onnx permissions: contents: write # IMPORTANT: mandatory for making GitHub Releases # TODO: check what is needed here? diff --git a/.github/workflows/manylinux/entrypoint.sh b/.github/workflows/manylinux/entrypoint.sh index 4431212bc5e..ed7b474d64f 100644 --- a/.github/workflows/manylinux/entrypoint.sh +++ b/.github/workflows/manylinux/entrypoint.sh @@ -10,6 +10,7 @@ set -e -x PY_VERSION=$1 PLAT=$2 GITHUB_EVENT_NAME=$3 +DATE_FOR_WEEKLY=$4 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib @@ -40,9 +41,16 @@ export CMAKE_ARGS="-DPYTHON_INCLUDE_DIR=/opt/python/${PY_VER}/include/python$PY_ # Install Python dependency $PIP_INSTALL_COMMAND -r requirements-release.txt || { echo "Installing Python requirements failed."; exit 1; } +todays_date=".dev" + $DATE_FOR_WEEKLY #datetime.date.today().strftime("%Y%m%d") +sed ' 1 s/.*/$todays_date/' VERSION_NUMBER + # Build wheels if [ "$GITHUB_EVENT_NAME" == "schedule" ]; then sed -i 's/name = "onnx"/name = "onnx-weekly"/' 'pyproject.toml' + todays_date=".dev" + $DATE_FOR_WEEKLY #datetime.date.today().strftime("%Y%m%d") + sed -i ' 1 s/.*/$todays_date/' VERSION_NUMBER + + # _version += ".dev" + todays_date ONNX_PREVIEW_BUILD=1 $PYTHON_COMMAND -m build --wheel || { echo "Building wheels failed."; exit 1; } else $PYTHON_COMMAND -m build --wheel || { echo "Building wheels failed."; exit 1; } diff --git a/.github/workflows/release_linux_x86_64.yml b/.github/workflows/release_linux_x86_64.yml index bd425ee3dd6..3db065aa0b0 100644 --- a/.github/workflows/release_linux_x86_64.yml +++ b/.github/workflows/release_linux_x86_64.yml @@ -14,8 +14,6 @@ on: # Specifies the event triggering the workflow required: true type: string - - permissions: # set top-level default permissions as security best practice contents: read @@ -45,7 +43,7 @@ jobs: uses: docker://quay.io/pypa/manylinux2014_x86_64:latest with: entrypoint: bash - args: .github/workflows/manylinux/entrypoint.sh ${{ matrix.python-version }} manylinux2014_x86_64 ${{ github.event_name }} + args: .github/workflows/manylinux/entrypoint.sh ${{ matrix.python-version }} manylinux2014_x86_64 ${{ github.event_name }} $${{ inputs.currdate}} - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0