-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
yabs.yaml
114 lines (96 loc) · 3.24 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
111
112
113
114
# Yabs Workflow Definition
# See https://github.com/mar10/yabs
file_version: yabs#1
config:
repo: 'mar10/pyftpsync'
gh_auth:
oauth_token_var: GITHUB_OAUTH_TOKEN
version:
- type: __version__ # First entry is master for synchronizing
file: ftpsync/__init__.py
max_increment: minor
branches: # Allowed git branches
- master
tasks:
# 'check': Assert preconditons and fail otherwise
- task: check
# can_push: true # Test if 'git push' would/would not succeed
# github: true # GitHub repo name valid and online accessible
# clean: true # Repo must/must not contain modifications
os: null # (str, list)
# pypi: true # `twine` is available, PyPI package accessible
python: ">=3.11" # SemVer specifier
# up_to_date: true # everything pulled from remote
# venv: true # running inside a virtual environment
# version: true # `setup.py --version` returns the configured version
# winget: null # `wingetcreate` is available
# 'run': Run arbitrary shell command
- task: exec
args: ["tox", "-e", "check"]
always: true # `true`: run even in dry-run mode
silent: true # `true`: suppress output (unless error)
ignore_errors: false # `true`: show warning, but proceed on errors (exit code != 0)
- task: exec
args: ["tox"]
always: true
silent: true
ignore_errors: false
# '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: ["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.pyftpsync'
# Commit after-release version
- task: bump
inc: postrelease
- task: commit
add_known: true
# '[ci skip]' tells CI/CD to ignore
message: |
Bump prerelease ({version}) [ci skip]
- task: push