seafdav/yabs.yaml
Martin Wendt bd11268a1e 2023
2023-02-18 16:38:22 +01:00

110 lines
3 KiB
YAML

# 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