Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows in the github_actions group across 1 directory #131
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: CI | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- v[0-9]+.[0-9]+.[0-9]+* | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install build | |
python -m build | |
python -m pip install --upgrade twine | |
python -m twine check dist/* | |
- name: 'Upload Artifact' | |
uses: actions/upload-artifact@v2 | |
with: | |
name: dist | |
path: dist/ | |
test: | |
name: Test Coverage | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install responses | |
pip install coverage | |
python ${{ github.workspace }}/setup.py install | |
- name: Run Tests | |
run: | | |
python -m coverage run -m unittest | |
python -m coverage xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
publish: | |
if: startsWith(github.ref, 'refs/tags/v') | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Download all workflow run artifacts | |
uses: actions/[email protected] | |
with: | |
name: dist | |
path: dist | |
- name: Set up Python 3 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Publish packages to PyPi | |
run: | | |
python -m pip install --upgrade twine | |
set -ex | |
export VERSION=$(python3 setup.py --version) | |
python -m twine upload --verbose dist/razorpay-$VERSION-py3-none-any.whl dist/razorpay-$VERSION.tar.gz | |
env: | |
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} | |