forked from aws/aws-step-functions-data-science-sdk-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildspec_release.yaml
27 lines (23 loc) · 1.15 KB
/
buildspec_release.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
version: 0.2
phases:
pre_build:
commands:
- python setup.py sdist
- python -m pip install --upgrade twine
build:
commands:
- PACKAGE_FILE="dist/stepfunctions-*.tar.gz"
- SIGNATURE_FILE="dist/*.asc"
- PYPI_USER=$(aws secretsmanager get-secret-value --secret-id /codebuild/pypi/user --query SecretString --output text)
- PYPI_PASSWORD=$(aws secretsmanager get-secret-value --secret-id /codebuild/pypi/password --query SecretString --output text)
- GPG_PRIVATE_KEY=$(aws secretsmanager get-secret-value --secret-id /codebuild/gpg/private_key --query SecretString --output text)
- GPG_PASSWORD=$(aws secretsmanager get-secret-value --secret-id /codebuild/gpg/password --query SecretString --output text)
- echo 'md5sum of python package:'
- md5sum $PACKAGE_FILE
# import private key and ensure passphrase is cached
- echo "$GPG_PRIVATE_KEY" | gpg --batch --import
- gpg --pinentry-mode loopback --passphrase "$GPG_PASSWORD" --detach-sign -a $PACKAGE_FILE
- python -m twine upload -u $PYPI_USER -p $PYPI_PASSWORD $PACKAGE_FILE $SIGNATURE_FILE
artifacts:
files:
- '**/*'