|
36 | 36 | key: >- |
37 | 37 | ${{ env.CACHE_VERSION}}-${{ runner.os }}-base-venv-${{ |
38 | 38 | steps.python.outputs.python-version }}-${{ |
39 | | - hashFiles('requirements_test.txt') }}-${{ |
40 | 39 | hashFiles('setup.py') }} |
41 | 40 | restore-keys: | |
42 | | - ${{ env.CACHE_VERSION}}-${{ runner.os }}-base-venv-${{ steps.python.outputs.python-version }}-${{ hashFiles('requirements_test.txt') }}-${{ hashFiles('setup.py') }}- |
43 | | - ${{ env.CACHE_VERSION}}-${{ runner.os }}-base-venv-${{ steps.python.outputs.python-version }}-${{ hashFiles('requirements_test.txt') }} |
| 41 | + ${{ env.CACHE_VERSION}}-${{ runner.os }}-base-venv-${{ steps.python.outputs.python-version }}-${{ hashFiles('setup.py') }} |
44 | 42 | ${{ env.CACHE_VERSION}}-${{ runner.os }}-base-venv-${{ steps.python.outputs.python-version }}- |
45 | 43 | - name: Create Python virtual environment |
46 | 44 | if: steps.cache-venv.outputs.cache-hit != 'true' |
|
50 | 48 | pip install -U pip setuptools |
51 | 49 | pip install -e . |
52 | 50 | pip install -r requirements_test.txt |
53 | | - - name: Restore pre-commit environment from cache |
54 | | - id: cache-precommit |
55 | | - uses: actions/cache@v2 |
56 | | - with: |
57 | | - path: ${{ env.PRE_COMMIT_HOME }} |
58 | | - key: | |
59 | | - ${{ env.CACHE_VERSION}}-${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} |
60 | | - restore-keys: | |
61 | | - ${{ env.CACHE_VERSION}}-${{ runner.os }}-pre-commit- |
62 | | - - name: Install pre-commit dependencies |
63 | | - if: steps.cache-precommit.outputs.cache-hit != 'true' |
64 | | - run: | |
65 | | - . venv/bin/activate |
66 | | - pre-commit install-hooks |
67 | 51 |
|
68 | 52 | publishing: |
69 | 53 | name: Build and publish Python 🐍 distributions 📦 to PyPI |
|
87 | 71 | key: >- |
88 | 72 | ${{ env.CACHE_VERSION}}-${{ runner.os }}-base-venv-${{ |
89 | 73 | steps.python.outputs.python-version }}-${{ |
90 | | - hashFiles('requirements_test.txt') }}-${{ |
91 | 74 | hashFiles('setup.py') }} |
92 | 75 | - name: Fail job if Python cache restore failed |
93 | 76 | if: steps.cache-venv.outputs.cache-hit != 'true' |
|
97 | 80 | - name: Build a distribution |
98 | 81 | run: >- |
99 | 82 | python setup.py sdist |
100 | | - - name: Publish distribution 📦 to Test PyPI |
| 83 | + - name: Publish distribution 📦 to PyPI |
101 | 84 | uses: pypa/gh-action-pypi-publish@master |
102 | 85 | with: |
103 | 86 | password: ${{ secrets.pypi_token }} |
|
0 commit comments