Release 3.1.3 (#175) #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build-release | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- checkout_sdk/properties.py | |
jobs: | |
deploy: | |
if: github.ref == 'refs/heads/main' | |
#runs-on: ubuntu-latest | |
# python3.6 reached EOL and is no longer being supported on | |
# new versions of hosted runners on GitHub Actions | |
# ubuntu-20.04 is the last version that supported python3.6 | |
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- id: setup-python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.6 | |
- id: install-tooling | |
run: | | |
python -m pip install --upgrade pip | |
pip install wheel | |
pip install twine | |
pip install build | |
- id: install-project-dependencies | |
run: | | |
pip install -r requirements-dev.txt | |
- id: testing | |
env: | |
CHECKOUT_PROCESSING_CHANNEL_ID: ${{ secrets.IT_CHECKOUT_PROCESSING_CHANNEL_ID }} | |
CHECKOUT_PREVIOUS_SECRET_KEY: ${{ secrets.IT_CHECKOUT_PREVIOUS_SECRET_KEY }} | |
CHECKOUT_PREVIOUS_PUBLIC_KEY: ${{ secrets.IT_CHECKOUT_PREVIOUS_PUBLIC_KEY }} | |
CHECKOUT_DEFAULT_SECRET_KEY: ${{ secrets.IT_CHECKOUT_DEFAULT_SECRET_KEY }} | |
CHECKOUT_DEFAULT_PUBLIC_KEY: ${{ secrets.IT_CHECKOUT_DEFAULT_PUBLIC_KEY }} | |
CHECKOUT_DEFAULT_OAUTH_CLIENT_ID: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_CLIENT_ID }} | |
CHECKOUT_DEFAULT_OAUTH_CLIENT_SECRET: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_CLIENT_SECRET }} | |
CHECKOUT_DEFAULT_OAUTH_PAYOUT_SCHEDULE_CLIENT_ID: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_PAYOUT_SCHEDULE_CLIENT_ID }} | |
CHECKOUT_DEFAULT_OAUTH_PAYOUT_SCHEDULE_CLIENT_SECRET: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_PAYOUT_SCHEDULE_CLIENT_SECRET }} | |
CHECKOUT_DEFAULT_OAUTH_ACCOUNTS_CLIENT_ID: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_ACCOUNTS_CLIENT_ID }} | |
CHECKOUT_DEFAULT_OAUTH_ACCOUNTS_CLIENT_SECRET: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_ACCOUNTS_CLIENT_SECRET }} | |
CHECKOUT_DEFAULT_OAUTH_ISSUING_CLIENT_ID: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_ISSUING_CLIENT_ID }} | |
CHECKOUT_DEFAULT_OAUTH_ISSUING_CLIENT_SECRET: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_ISSUING_CLIENT_SECRET }} | |
CHECKOUT_MERCHANT_SUBDOMAIN: ${{ secrets.IT_CHECKOUT_MERCHANT_SUBDOMAIN }} | |
run: python -m pytest -x --import-mode=append tests/ | |
- id: read-version | |
run: echo "CURRENT_VERSION=$(grep -o '".*"' checkout_sdk/properties.py | sed 's/"//g' | tr -d \\n)" >> $GITHUB_ENV | |
- id: print-version | |
run: echo "Releasing $CURRENT_VERSION" | |
- id: build-dist | |
run: python -m build | |
- id: upload-dist | |
run: twine upload dist/* -u ${{ secrets.PY_PI_USER }} -p ${{ secrets.PY_PI_PW }} | |
- id: create-release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ env.CURRENT_VERSION }} | |
release_name: ${{ env.CURRENT_VERSION }} | |
body: ${{ github.event.head_commit.message }} | |
draft: false | |
prerelease: false |