12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- name: auto CI
- on:
- push:
- branches: [ master ]
- pull_request:
- branches: [ master ]
- schedule:
- - cron: "0 2 * * 1-5"
- env:
- POETRY_VERSION: 1.8.3
- PYTHON_VERSION: "3.12"
- jobs:
- build:
- strategy:
- matrix:
- os: [ubuntu-latest, macos-latest, windows-latest]
- include:
- - os: ubuntu-latest
- path: ~/.cache/pip
- - os: macos-latest
- path: ~/Library/Caches/pip
- - os: windows-latest
- path: ~\AppData\Local\pip\Cache
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
-
- - name: Set up Python
- id: setup-python
- uses: actions/setup-python@v5
- with:
- python-version: ${{ env.PYTHON_VERSION }}
- - name: Install Poetry ${{ env.POETRY_VERSION }}
- uses: abatilo/actions-poetry@v3.0.0
- with:
- poetry-version: ${{ env.POETRY_VERSION }}
- - uses: actions/cache@v2
- with:
- path: ${{ matrix.path }}
- key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
- restore-keys: |
- ${{ runner.os }}-pip-
- - uses: actions/cache@v2
- with:
- path: ~/.local/share/virtualenvs
- key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-pipenv-${{ hashFiles('Pipfile.lock') }}
-
- - name: Install dependencies
- run: |
- python -m pip install --upgrade pip
- if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
-
- - name: Update Deny Host
- run: |
- pwd
- python cmd/refresh.py
- - name: Push to built branch
- uses: Automattic/action-commit-to-branch@master
- with:
- branch: 'master'
- commit_message: 'Update Host'
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- - name: Publish distribution 📦 to Test PyPI
- uses: pypa/gh-action-pypi-publish@master
- with:
- user: __token__
- password: ${{ secrets.test_pypi_password }}
- repository_url: https://test.pypi.org/legacy/
- - name: Publish distribution 📦 to PyPI
- if: startsWith(github.event.ref, 'refs/tags')
- uses: pypa/gh-action-pypi-publish@master
- with:
- user: __token__
- password: ${{ secrets.pypi_password }}
|