Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【Hackathon 7th No.48】Paddle2ONNX 添加对 Windows 平台自动发包机制的支持 #1439

Merged
merged 6 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/release_win_amd64.yml
Original file line number Diff line number Diff line change
@@ -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 }}
2 changes: 1 addition & 1 deletion VERSION_NUMBER
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.11
1.3.0