-
Notifications
You must be signed in to change notification settings - Fork 17
45 lines (43 loc) · 1.28 KB
/
build.yml
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
name: Build
on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.8'
cache: 'pip'
- run: pip install -r requirements.txt
- run: pip install -e .
- run: flake8 kuyruk/
- run: mypy kuyruk/
- run: pytest -v --cov=kuyruk --cov-report xml tests/
- uses: coverallsapp/github-action@v2
- run: echo ${{github.ref_name}} > VERSION
- name: Install pypa/build
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: >-
python3 -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1