From 4b2a204c1f0f1c608e7ef6a530f137c8a32e2e4c Mon Sep 17 00:00:00 2001 From: Zhenghai Zhang <65210872+ccsuzzh@users.noreply.github.com> Date: Wed, 20 Nov 2024 19:37:03 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90Hackathon=207th=20No.48=E3=80=91Paddle?= =?UTF-8?q?2ONNX=20=E6=B7=BB=E5=8A=A0=E5=AF=B9=20Windows=20=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E8=87=AA=E5=8A=A8=E5=8F=91=E5=8C=85=E6=9C=BA=E5=88=B6?= =?UTF-8?q?=E7=9A=84=E6=94=AF=E6=8C=81=20(#1439)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add release_win_amd64.yml * fix bug * test publish test pypi * finish test pypi * rename project name * update version number --- .github/workflows/release_win_amd64.yml | 59 +++++++++++++++++++++++++ VERSION_NUMBER | 2 +- 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release_win_amd64.yml diff --git a/.github/workflows/release_win_amd64.yml b/.github/workflows/release_win_amd64.yml new file mode 100644 index 000000000..87f2b6cfe --- /dev/null +++ b/.github/workflows/release_win_amd64.yml @@ -0,0 +1,59 @@ +name: WindowsRelease_amd64 + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + build: + runs-on: windows-2019 + strategy: + matrix: + python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12'] + architecture: [ 'x64' ] + + steps: + # Checkout the latest branch of Paddle2ONNX. + - name: Checkout Paddle2ONNX + uses: actions/checkout@v4 + with: + submodules: true + + # Download and extract protobuf + - name: Download and extract protobuf + run: | + curl -L -o protobuf.zip https://bj.bcebos.com/fastdeploy/third_libs/protobuf-win-x64-3.16.0.zip + powershell -Command "Expand-Archive -Path protobuf.zip -DestinationPath $PWD/protobuf" + + # Setup Python + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 + with: + python-version: ${{ matrix.python-version }} + architecture: ${{ matrix.architecture }} + + # Install Python dependencies + - name: Install Python dependencies + run: | + python -m pip install -q --upgrade pip + python -m pip install setuptools wheel auditwheel auditwheel-symbols build twine + + - name: Build package + run: | + $Env:PATH = "${{ github.workspace }}\protobuf\bin;" + $Env:PATH + python -m build --wheel + + - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 + with: + name: wheels + path: dist + + - name: Publish package + run: | + python -m twine upload --repository-url https://upload.pypi.org/legacy/ dist/* + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PADDLE2ONNX_API_TOKEN }} diff --git a/VERSION_NUMBER b/VERSION_NUMBER index bb7a48bb9..589268e6f 100644 --- a/VERSION_NUMBER +++ b/VERSION_NUMBER @@ -1 +1 @@ -1.2.11 \ No newline at end of file +1.3.0 \ No newline at end of file