mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 04:59:24 +01:00
drone: add PyPI push, build Docker on a branch to allow for weekly cron
This commit is contained in:
parent
ca2d603fa1
commit
499a0dd403
@ -4,8 +4,8 @@
|
|||||||
VERSION="$1"
|
VERSION="$1"
|
||||||
|
|
||||||
if test -z "$VERSION"; then
|
if test -z "$VERSION"; then
|
||||||
echo "Usage: $0 <version>"
|
echo "Reading version from VERSION file" >&2
|
||||||
exit 1
|
VERSION=$(<VERSION)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$VERSION" == *"alpha"* || "$VERSION" == *"dev"* ]]; then
|
if [[ "$VERSION" == *"alpha"* || "$VERSION" == *"dev"* ]]; then
|
||||||
|
@ -44,7 +44,31 @@ local build_docker(py_version) = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"depends_on": ["test-" + py_version],
|
"trigger": {
|
||||||
|
"event": [
|
||||||
|
"push"
|
||||||
|
],
|
||||||
|
"branch": ["release"],
|
||||||
|
},
|
||||||
|
"depends_on": ["test-" + py_version]
|
||||||
|
};
|
||||||
|
|
||||||
|
local deploy_pypi(py_version) = {
|
||||||
|
"kind": "pipeline",
|
||||||
|
"type": "docker",
|
||||||
|
"name": "deploy_pypi",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"name": "pypi_publish",
|
||||||
|
"image": "plugins/pypi",
|
||||||
|
"settings": {
|
||||||
|
"username": "__token__",
|
||||||
|
"password": {
|
||||||
|
"from_secret": "pypi_token"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
"trigger": {
|
"trigger": {
|
||||||
"event": [
|
"event": [
|
||||||
"tag"
|
"tag"
|
||||||
@ -52,10 +76,12 @@ local build_docker(py_version) = {
|
|||||||
"ref": {
|
"ref": {
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"refs/tags/*alpha*",
|
"refs/tags/*alpha*",
|
||||||
|
"refs/tags/*beta*",
|
||||||
"refs/tags/*dev*"
|
"refs/tags/*dev*"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"depends_on": ["test-" + py_version]
|
||||||
};
|
};
|
||||||
|
|
||||||
[
|
[
|
||||||
@ -63,5 +89,6 @@ local build_docker(py_version) = {
|
|||||||
test("3.8"),
|
test("3.8"),
|
||||||
test("3.9"),
|
test("3.9"),
|
||||||
test("3.10"),
|
test("3.10"),
|
||||||
|
deploy_pypi("3.10"),
|
||||||
build_docker("3.10"),
|
build_docker("3.10"),
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user