APIv5 hardcode the timeZone param for search terms to ORTZ #7
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: Publish Python Package | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' # specify your desired Python version | |
- name: Set up Git user | |
run: | | |
git config --global user.name "github-actions" | |
git config --global user.email "[email protected]" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel twine bump2version | |
- name: Bump version | |
run: bump2version patch # or 'minor' or 'major' depending on the level of version bump you want | |
- name: Get bumped version | |
id: get_version | |
run: | | |
echo "VERSION=$(python setup.py --version)" >> $GITHUB_ENV | |
- name: Create GitHub release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
VERSION: ${{ env.VERSION }} | |
run: | | |
curl -X POST \ | |
-H "Authorization: token $GITHUB_TOKEN" \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
https://api.github.com/repos/${{ github.repository }}/releases \ | |
-d '{"tag_name":"v'${{ env.VERSION }}'","name":"v'${{ env.VERSION }}'","body":"Release version '${{ env.VERSION }}'"}' | |
- name: Build package | |
run: python setup.py sdist bdist_wheel | |
- name: Publish package | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.SEARCHADS_API_PUBLISH_TOKEN }} | |
run: twine upload dist/* | |
- name: Clean up | |
run: rm -rf dist build *.egg-info |