v0.13.3: 行业 ROE 段独立渲染 + _BAOSTOCK_INDUSTRY_MAP 扩到 40+ 行业 #1
Workflow file for this run
This file contains hidden or 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
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Run tests | |
| run: pytest -q | |
| - name: Generate changelog from commits since last tag | |
| id: changelog | |
| run: | | |
| PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "") | |
| if [ -z "$PREV_TAG" ]; then | |
| git log --oneline > /tmp/changelog.txt | |
| else | |
| echo "## Commits since $PREV_TAG" > /tmp/changelog.txt | |
| git log --oneline ${PREV_TAG}..HEAD >> /tmp/changelog.txt | |
| fi | |
| cat /tmp/changelog.txt | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| body_path: /tmp/changelog.txt | |
| draft: false | |
| prerelease: false |