-
-
Notifications
You must be signed in to change notification settings - Fork 150
/
yabs.yaml
110 lines (92 loc) · 3 KB
/
yabs.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Yabs Workflow Definition
# See https://github.com/mar10/yabs
file_version: yabs#1
config:
repo: 'mar10/wsgidav'
gh_auth:
oauth_token_var: GITHUB_OAUTH_TOKEN
version:
- type: __version__ # First entry is master for synchronizing
file: wsgidav/__init__.py
max_increment: minor
branches: # Allowed git branches
- master
tasks:
# 'check': Assert preconditons and fail otherwise
- task: check
python: ">=3.11" # SemVer specifier
winget: null # `wingetcreate` is available
# 'exec': Run arbitrary shell command
- task: exec
args: ["tox", "-e", "check"] # shell command and optional arguments
always: true # `true`: run even in dry-run mode
# silent: true # `true`: suppress output
stream: true
ignore_errors: false # `true`: show warning, but proceed on errors (exit code != 0)
- task: exec
args: ["tox"] # shell command and optional arguments
always: true # `true`: run even in dry-run mode
# silent: true # `true`: suppress output
# timeout: 20
stream: true
ignore_errors: false # `true`: show warning, but proceed on errors (exit code != 0)
# 'bump': version by `--inc` argument
- task: bump
# inc: null # Use value passed as 'yabs run --inc INC'
# 'commit': Commit modified files
- task: commit
add: [] # Also `git add` these files ('.' for all)
add_known: true # Commit with -a flag
message: |
Bump version to {version}
# 'tag': Create an annotated tag
- task: tag
name: v{version}
message: |
Version {version}
# 'build': `setup.y bdist_wheel`, ...
- task: build
targets:
- sdist
- bdist_wheel
# Build MSI Installer.
- task: exec
args: ["tox", "-e", "bdist_msi"]
# args: ["python", "setup_bdist_msi.py", "bdist_msi"]
always: true
silent: true # `true`: suppress output
# stream: true
ignore_errors: true # Try it (will fail on non-Windows)
add_artifacts: # Add new files if any
folder: "dist"
matches:
bdist_msi: '.*\.msi'
# 'push': Push changes and tags
- task: push
tags: true
# 'pypi_release': Create a release on PyPI
- task: pypi_release
# 'github_release': Create a release on GitHub
- task: github_release
name: 'v{version}'
message: |
Released {version}
[Changelog](https://github.com/{repo}/blob/master/CHANGELOG.md),
[Commit details](https://github.com/{repo}/compare/{org_tag_name}...{tag_name}).
# draft: true
prerelease: null # null: guess from version number format
# upload:
# - sdist
# - bdist_wheel
- task: winget_release
upload: bdist_msi
package_id: 'mar10.wsgidav'
# Commit after-release version
- task: bump
inc: postrelease
- task: commit
add_known: true
# '[ci skip]' tells travis to ignore
message: |
Bump prerelease ({version}) [ci skip]
- task: push