Build and test #142
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: Build and test | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| create: | |
| schedule: | |
| - cron: "0 4 * * 2" | |
| jobs: | |
| build_and_test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install fuse | |
| run: sudo apt-get install -y fuse | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.8" | |
| - name: Install tox | |
| run: | | |
| pip install --upgrade pip | |
| pip install tox | |
| - name: Run tox | |
| run: tox | |
| release: | |
| if: ${{ github.event_name != 'schedule' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) }} | |
| needs: build_and_test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.8" | |
| - name: Install tox | |
| run: | | |
| pip install --upgrade pip | |
| pip install tox | |
| - name: Publish CLI to PyPI | |
| env: | |
| TWINE_USERNAME: "__token__" | |
| TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
| TWINE_NON_INTERACTIVE: "true" | |
| run: | | |
| tox -e release |