Skip to content

fix and test

fix and test #2

name: Publish to PyPI
on:
push:
branches:
- main # 只要 main 分支有新的 push 就觸發
jobs:
build-n-publish:
name: Build and publish to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install torch setuptools wheel build
- name: Build binary wheel and source tarball
run: python -m build
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1