chore: bump requests from 2.32.5 to 2.33.0 #74
Workflow file for this run
This file contains hidden or 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/CD Pipeline | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "*.*.*" | |
| jobs: | |
| linting: | |
| name: Linting | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - uses: astral-sh/ruff-action@v3 | |
| with: | |
| version: "latest" | |
| - run: ruff check | |
| - run: ruff format --check | |
| test: | |
| name: Test | |
| needs: linting | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| os: ["ubuntu-latest", "macos-latest"] | |
| python-version: ["3.12"] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up python ${{ matrix.python-version }} | |
| id: setup-python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - uses: snok/install-poetry@v1 | |
| with: | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| - name: Load cached venv | |
| id: cached-poetry-dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: .venv | |
| key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
| - name: Install dependencies | |
| if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
| run: poetry install --no-interaction --no-root | |
| - name: Install library | |
| run: poetry install --no-interaction | |
| - name: Run tests | |
| run: | | |
| source .venv/bin/activate | |
| poetry run pytest -v | |
| publish: | |
| name: Publish to PyPI | |
| needs: test | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - uses: snok/install-poetry@v1 | |
| - name: Publish package | |
| run: | | |
| poetry config pypi-token.pypi ${{ secrets.PYPIP_TOKEN }} | |
| poetry publish --build --no-interaction | |
| - name: Send Telegram Notification | |
| uses: appleboy/telegram-action@master | |
| with: | |
| to: ${{ secrets.TELEGRAM_TO }} | |
| token: ${{ secrets.TELEGRAM_TOKEN }} | |
| format: markdown | |
| message: | | |
| 🚀 **New Version Published!** | |
| 📦 **Project:** ${{ github.repository }} | |
| 🏷️ **Version:** `${{ github.ref_name }}` | |
| 👤 **Author:** ${{ github.actor }} | |
| [View on PyPI](https://pypi.org/project/cloudsnake/${{ github.ref_name }}) | |
| changelog: | |
| name: Generate CHANGELOG | |
| needs: publish | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install cocogitto | |
| run: | | |
| rustup default stable | |
| cargo install cocogitto | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set tag | |
| id: set_tag | |
| run: | | |
| # Extract the tag name from the full reference | |
| TAG_NAME=$(echo "${{ github.ref }}" | sed 's|.*/||') | |
| echo "TAG_NAME=$TAG_NAME" >> "$GITHUB_ENV" | |
| - name: Update CHANGELOG.md in main branch | |
| # if: github.ref == 'refs/tags/v*.*.*' | |
| run: | | |
| git checkout main | |
| git pull origin main | |
| git config --global user.name 'containerscrew' | |
| git config --global user.email 'containerscrew@users.noreply.github.com' | |
| rm CHANGELOG.md | |
| cog changelog > CHANGELOG.md | |
| git add CHANGELOG.md | |
| git commit -m "Update CHANGELOG.md for release ${{ env.TAG_NAME }}" | |
| git push origin main |