Migrate to pyproject.toml with setuptools_scm for tag-based versionin… #39
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: Build Wheel | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.9' | |
| - name: Set Branch Name | |
| run: | | |
| echo "branch_name=${GITHUB_HEAD_REF##*/}" >> $GITHUB_ENV | |
| - name: Check Branch | |
| run: echo "$env.branch_name" | |
| - name: Get Hash | |
| id: hash | |
| run: echo "git_hash=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV | |
| - name: Build wheel | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build | |
| python -m build | |
| - name: Upload Wheel Artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: vecto-wheel-${{ env.branch_name }}-${{ env.git_hash }} | |
| path: dist/*.whl | |
| - name: Upload Dist Directory Artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: dist-${{ env.branch_name }}-${{ env.git_hash }} | |
| path: dist/ |