-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from zsrl/develop
perf: 修改创建参数
- Loading branch information
Showing
3 changed files
with
79 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,78 @@ | ||
name: Python package | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
Test: | ||
runs-on: windows-latest | ||
permissions: write-all | ||
|
||
env: | ||
POETRY_HTTP_TIMEOUT: 600 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Ensure full history for semantic-release | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.9' # You can specify your required Python version here | ||
|
||
- name: Install dependencies | ||
- name: Install Poetry and Build | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pyyaml | ||
pip install auto-changelog | ||
pip install poetry setuptools cython | ||
python setup.py build_ext --inplace | ||
shell: bash | ||
|
||
- name: Build and publish to PyPI | ||
uses: JRubics/[email protected] | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v5 | ||
with: | ||
ignore_dev_requirements: "yes" | ||
pypi_token: ${{ secrets.PYPI_TOKEN }} | ||
python-version: '3.10' # You can specify your required Python version here | ||
|
||
- name: Changelog | ||
uses: ardalanamini/auto-changelog@master | ||
id : changelog | ||
- name: Check release status | ||
id: release-status | ||
run: | | ||
pip install python-semantic-release | ||
if semantic-release --noop --strict version; then | ||
echo "::set-output name=released::true" | ||
else | ||
echo "::set-output name=released::false" | ||
fi | ||
shell: bash | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create Release | ||
uses: softprops/action-gh-release@v1 | ||
env : | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
body : | | ||
${{ steps.changelog.outputs.changelog }} | ||
prerelease: ${{ steps.changelog.outputs.prerelease }} | ||
- name: Semantic Release Version | ||
if: steps.release-status.outputs.released == 'true' | ||
run: | | ||
semantic-release version | ||
shell: bash | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | ||
|
||
- name: Release to PyPI | ||
if: steps.release-status.outputs.released == 'true' | ||
run: | | ||
poetry config pypi-token.pypi $PYPI_TOKEN | ||
poetry publish --build | ||
shell: bash | ||
env: | ||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | ||
|
||
- name: Release to GitHub | ||
if: steps.release-status.outputs.released == 'true' | ||
run: | | ||
git fetch --tags | ||
for file in ./dist/*; do | ||
gh release upload "${{ steps.release-status.outputs.tag }}" $file | ||
done | ||
shell: bash | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,10 +6,12 @@ authors = ["pluto <[email protected]>"] | |
readme = "README.md" | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.8" | ||
python = ">=3.9, <3.13" | ||
backtrader = "^1.9.78.123" | ||
pandas = "^2.0.2" | ||
schedule = "^1.2.0" | ||
xtquant = "^240613.1.1" | ||
matplotlib = "^3.9.0" | ||
|
||
|
||
[tool.poetry.group.dev.dependencies] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters