Skip to content

new project structure #20

new project structure

new project structure #20

Workflow file for this run

name: Build package
on:
workflow_call:
pull_request:
types: [ opened, synchronize, reopened, ready_for_review ]
jobs:
linters:
uses: ./.github/workflows/lint.yml
build:
runs-on: ubuntu-latest
outputs:
WHL: ${{ steps.filenames.outputs.WHL }}
TARGZ: ${{ steps.filenames.outputs.TARGZ }}
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Setup hatch
run: python -m pip install hatch
- name: Set new version
if: startsWith(github.ref, 'refs/tags/v')
run: |
python -m hatch version ${GITHUB_REF/refs\/tags\/v/}
- name: Build package
run: python -m hatch build
- name: Set filenames in output
id: filenames
run: |
echo WHL=$(echo dist/*.whl) >> $GITHUB_OUTPUT
echo TARGZ=$(echo dist/*.tar.gz) >> $GITHUB_OUTPUT
- name: Archive package
uses: actions/upload-artifact@v3
with:
name: distributions
path: dist
retention-days: 5