generated from IRNAS/irnas-projects-template
-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (43 loc) · 1.12 KB
/
build.yaml
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Build
on:
workflow_call:
inputs:
checkout_ref:
required: true
type: string
pull_request:
types: [opened, reopened, synchronize]
jobs:
build:
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
steps:
- name: Checkout last PR commit
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout last tag
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v4
with:
ref: ${{ inputs.checkout_ref }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
cache: "pip"
- name: Install dependencies
run: make install
- name: Run tests
run: make test
- name: Build binary wheel and a source tarball
run: make build
- name: Package artefacts
if: github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/*