This repository has been archived by the owner on Sep 30, 2024. It is now read-only.
Fix doc typo (#12) #48
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
# Copyright Jiaqi Liu | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
--- | |
name: CI/CD | |
"on": | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
yml-md-style-and-link-checks: | |
uses: QubitPi/hashicorp-aws/.github/workflows/yml-md-style-and-link-checks.yml@master | |
tests: | |
name: Run all tests | |
needs: yml-md-style-and-link-checks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Run tests | |
run: | | |
python setup.py pep8 | |
python setup.py isort | |
- name: Test dist build | |
run: python setup.py sdist | |
push-release-tag: | |
needs: tests | |
if: github.ref == 'refs/heads/master' | |
uses: QubitPi/hashicorp-aws/.github/workflows/version-bump.yml@master | |
with: | |
user: QubitPi | |
email: jack20220723@gmail.com | |
release: | |
name: Publish Python SDK To PyPI | |
if: github.ref == 'refs/heads/master' | |
needs: push-release-tag | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Bump version | |
run: | | |
git pull | |
VERSION=$(git describe) | |
echo "INFO Last tag: $VERSION" | |
sed -i "s/ version=\"1.0.0\",/ version=\"$VERSION\",/" setup.py | |
- name: Package up SDK | |
run: python setup.py sdist | |
- name: Publish a Python distribution to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |