-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (32 loc) · 1003 Bytes
/
Copy pathpre-commit-and-build.yml
File metadata and controls
32 lines (32 loc) · 1003 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: "Build and Release Python Package in whl"
run-name: "Package build version: ${{ github.event }}"
on:
push:
branches: [develop, main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install pre-commit
run: |
pip install pre-commit
- name: Install requirements
run: |
pip install -r requirements.txt
- uses: pre-commit/action@v3.0.1
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build wheel
run: VERSION=${{ github.event.inputs.release-version }} python setup.py bdist_wheel
- name: Upload wheel
uses: actions/upload-artifact@v2
with:
name: ${{ github.event.repository.name }}-${{ github.ref_name }}.whl
path: dist/*.whl