Skip to content

Commit

Permalink
fix: publish to pypi
Browse files Browse the repository at this point in the history
Signed-off-by: loonghao <[email protected]>
  • Loading branch information
loonghao committed May 4, 2024
1 parent 41ef17c commit 5ec997e
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 11 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/mr-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: MR Checks
on: [pull_request]

jobs:
python-check:
runs-on: windows-2022
strategy:
max-parallel: 3
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install -U pip poetry nox
poetry --version
nox --version
nox -s preflight
15 changes: 9 additions & 6 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
with:
Expand All @@ -26,12 +29,12 @@ jobs:
python -m pip install -U pip poetry nox
poetry --version
poetry install
- name: Publish
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
poetry publish --build -u $PYPI_USERNAME -p $PYPI_PASSWORD
# Note that we don't need credentials.
# We rely on https://docs.pypi.org/trusted-publishers/.
- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist
- name: Create release Version
run: gh release create ${{ steps.vars.outputs.tag }} --generate-notes
env:
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ nox -s maya-2020
```

## 在maya中测试
通过nox -s maya-xxx, 启动maya
通过`nox -s maya-xxx`, 启动maya.
nox会动态根据你本地安装得maya去注册nox session, 比如你本地安装了`maya-2020`,那么通过`nox -s maya-2018`

启动maya后在脚本编辑器中执行下面得代码,就会动态的从`<repo>/tests/virus/`里面去open ma文件去进行测试.
```python
import manual_test_in_maya

Expand Down
4 changes: 0 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ def _setup_maya(maya_version):
if not os.path.isdir(root):
print("Failed to locate the appropriate Maya path in the registration list.")
except WindowsError:
print(
f"The installed version of Maya {maya_version} was not found "
f"in the system. Registering Nox session failed."
)
return
bin_root = os.path.join(root, "bin")
return {
Expand Down

0 comments on commit 5ec997e

Please sign in to comment.