Skip to content

v17.1.2

v17.1.2 #56

Workflow file for this run

name: Deploy SDK
on:
release:
types:
- published
jobs:
deploy_pre_release:
name: Deploy OpenAPI Generator Client Pre-Release to PYPI
if: ${{ github.event.release.prerelease && github.event.release.target_commitish == 'feature/openapi-generator-sdk' }}
runs-on: ubuntu-latest
env:
BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }}
BW_USERNAME: ${{ secrets.BW_USERNAME }}
BW_PASSWORD: ${{ secrets.BW_PASSWORD }}
BW_USERNAME_FORBIDDEN: ${{ secrets.BW_USERNAME_FORBIDDEN }}
BW_PASSWORD_FORBIDDEN: ${{ secrets.BW_PASSWORD_FORBIDDEN }}
BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID }}
BW_MESSAGING_APPLICATION_ID: ${{ secrets.BW_MESSAGING_APPLICATION_ID }}
BW_NUMBER: ${{ secrets.BW_NUMBER }}
USER_NUMBER: ${{ secrets.USER_NUMBER }}
VZW_NUMBER: ${{ secrets.VZW_NUMBER }}
ATT_NUMBER: ${{ secrets.ATT_NUMBER }}
T_MOBILE_NUMBER: ${{ secrets.T_MOBILE_NUMBER }}
BASE_CALLBACK_URL: ${{ secrets.BASE_CALLBACK_URL }}
PYTHON_VERSION: ${{ matrix.python-version }}
OPERATING_SYSTEM: ${{ matrix.os }}
MANTECA_ACTIVE_NUMBER: ${{ secrets.MANTECA_ACTIVE_NUMBER }}
MANTECA_IDLE_NUMBER: ${{ secrets.MANTECA_IDLE_NUMBER }}
MANTECA_BASE_URL: ${{ secrets.MANTECA_BASE_URL }}
MANTECA_APPLICATION_ID: ${{ secrets.MANTECA_APPLICATION_ID }}
steps:
- name: Set Release Version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Check Release Tag Format
run: |
re=[0-9]+\.[0-9]+\.[0-9]+b[0-9]+
if ! [[ $RELEASE_VERSION =~ $re ]]; then
echo 'Tag does not match expected regex pattern for beta releases (v[0-9]+.[0-9]+.[0-9]+b[0-9]+)'
echo $RELEASE_VERSION
echo 'Please update your tag to match the expected regex pattern'
exit 1
fi
- name: Checkout
uses: actions/checkout@v4
with:
ref: feature/openapi-generator-sdk
- name: Build SDK
uses: Bandwidth/[email protected]
with:
openapi-generator-version: 7.7.0
language: python
additional-properties: --additional-properties=packageVersion=$RELEASE_VERSION
- name: Install Packages
run: |
pip install -r requirements.txt
pip install -r test-requirements.txt
- name: Test
run: |
npm install -g @stoplight/prism-cli
prism mock ./bandwidth.yml & pytest -v ./test/unit
- name: Deploy to PYPI
run: |
pip install twine
pip install wheel
python setup.py sdist bdist_wheel
twine upload dist/* -u __token__ -p $PYPI_API_KEY
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
- uses: Bandwidth/[email protected]
if: always()
with:
job-status: ${{ job.status }}
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
slack-channel: ${{ secrets.SLACK_CHANNEL }}
deploy:
name: Deploy `main` to PYPI
if: ${{ !github.event.release.prerelease && github.event.release.target_commitish == 'main' }}
runs-on: ubuntu-latest
env:
BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }}
BW_USERNAME: ${{ secrets.BW_USERNAME }}
BW_PASSWORD: ${{ secrets.BW_PASSWORD }}
BW_USERNAME_FORBIDDEN: ${{ secrets.BW_USERNAME_FORBIDDEN }}
BW_PASSWORD_FORBIDDEN: ${{ secrets.BW_PASSWORD_FORBIDDEN }}
BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID }}
BW_MESSAGING_APPLICATION_ID: ${{ secrets.BW_MESSAGING_APPLICATION_ID }}
BW_NUMBER: ${{ secrets.BW_NUMBER }}
USER_NUMBER: ${{ secrets.USER_NUMBER }}
VZW_NUMBER: ${{ secrets.VZW_NUMBER }}
ATT_NUMBER: ${{ secrets.ATT_NUMBER }}
T_MOBILE_NUMBER: ${{ secrets.T_MOBILE_NUMBER }}
BASE_CALLBACK_URL: ${{ secrets.BASE_CALLBACK_URL }}
PYTHON_VERSION: ${{ matrix.python-version }}
OPERATING_SYSTEM: ${{ matrix.os }}
MANTECA_ACTIVE_NUMBER: ${{ secrets.MANTECA_ACTIVE_NUMBER }}
MANTECA_IDLE_NUMBER: ${{ secrets.MANTECA_IDLE_NUMBER }}
MANTECA_BASE_URL: ${{ secrets.MANTECA_BASE_URL }}
MANTECA_APPLICATION_ID: ${{ secrets.MANTECA_APPLICATION_ID }}
steps:
- name: Set Release Version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Check Release Tag Format
run: |
re=[0-9]+\.[0-9]+\.[0-9]+
if ! [[ $RELEASE_VERSION =~ $re ]]; then
echo 'Tag does not match expected regex pattern for releases (v[0-9]+.[0-9]+.[0-9]+b[0-9]+)'
echo $RELEASE_VERSION
echo 'Please update your tag to match the expected regex pattern'
exit 1
fi
- name: Checkout
uses: actions/checkout@v4
- name: Build SDK
uses: Bandwidth/[email protected]
with:
openapi-generator-version: 7.7.0
language: python
additional-properties: --additional-properties=packageVersion=$RELEASE_VERSION
- name: Install Packages
run: |-
pip install -r requirements.txt
pip install -r test-requirements.txt
- name: Test
run: |-
npm install -g @stoplight/prism-cli
prism mock ./bandwidth.yml & pytest -v ./test/unit
shell: bash
- name: Deploy to PYPI
run: |
pip install twine
pip install wheel
python setup.py sdist bdist_wheel
twine upload dist/* -u __token__ -p $PYPI_API_KEY
env:
PYPI_API_KEY: ${{ secrets.PYPI_API_KEY }}
- uses: Bandwidth/[email protected]
if: always()
with:
job-status: ${{ job.status }}
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
slack-channel: ${{ secrets.SLACK_CHANNEL }}