60 lines
1.6 KiB
YAML
60 lines
1.6 KiB
YAML
pipeline:
|
|
build:
|
|
image: brenard/debian-python-deb
|
|
when:
|
|
event: tag
|
|
commands:
|
|
- echo "$GPG_KEY"|base64 -d|gpg --import
|
|
- mkdir dist
|
|
- python3 -m pip wheel cx-Oracle -w dist --quiet
|
|
- wheel2deb --map attrs=attr -x dist -o dist
|
|
- cd dist/python3-cx-oracle_*_amd64
|
|
- sed -i "s/wheel2deb <wheel2deb@upciti.com>/$GPG_NAME <$GPG_EMAIL>/" debian/changelog debian/control
|
|
- sed -i "s/unstable/$DEB_DIST/" debian/changelog
|
|
- dpkg-buildpackage
|
|
- cd ../../
|
|
- rm -fr dist/python3-cx-oracle_*_amd64
|
|
- curl --silent https://api.github.com/repos/oracle/python-cx_Oracle/releases |jq --raw-output ".[] | select(.tag_name == \"$CI_COMMIT_TAG\") | .body" > dist/release_notes.md
|
|
secrets: [ gpg_key, gpg_name, gpg_email, deb_dist ]
|
|
|
|
publish-dryrun:
|
|
group: publish
|
|
image: debian
|
|
when:
|
|
event: tag
|
|
commands:
|
|
- ls dist/*
|
|
|
|
publish-gitea:
|
|
group: publish
|
|
image: plugins/gitea-release
|
|
when:
|
|
event: tag
|
|
settings:
|
|
api_key:
|
|
from_secret: gitea_token
|
|
base_url: https://gitea.zionetrix.net
|
|
note: dist/release_notes.md
|
|
files:
|
|
- dist/*.deb
|
|
- dist/*.whl
|
|
checksum:
|
|
- md5
|
|
- sha512
|
|
|
|
publish-apt:
|
|
group: publish
|
|
image: brenard/aptly-publish
|
|
when:
|
|
event: tag
|
|
settings:
|
|
api_url:
|
|
from_secret: apt_api_url
|
|
api_username:
|
|
from_secret: apt_api_username
|
|
api_password:
|
|
from_secret: apt_api_password
|
|
repo_name:
|
|
from_secret: apt_repo_name
|
|
path: dist
|
|
source_name: python3-cx-oracle
|