|
7 | 7 | types: [published]
|
8 | 8 | schedule:
|
9 | 9 | # Daily at 3:21
|
10 |
| - - cron: '21 3 * * *' |
| 10 | + - cron: "21 3 * * *" |
11 | 11 |
|
12 | 12 | jobs:
|
13 | 13 | pre-commit:
|
14 | 14 | runs-on: ubuntu-latest
|
15 | 15 | steps:
|
16 |
| - - uses: actions/checkout@v3 |
17 |
| - - uses: actions/setup-python@v4 |
18 |
| - with: |
19 |
| - python-version: "3.11" |
20 |
| - - uses: pre-commit/[email protected] |
| 16 | + - uses: actions/checkout@v3 |
| 17 | + - uses: actions/setup-python@v4 |
| 18 | + with: |
| 19 | + python-version: "3.11" |
| 20 | + - uses: pre-commit/[email protected] |
21 | 21 |
|
22 | 22 | ci:
|
23 | 23 | runs-on: ${{ matrix.os }}
|
@@ -152,59 +152,59 @@ jobs:
|
152 | 152 | toxenv: docs-style
|
153 | 153 |
|
154 | 154 | steps:
|
155 |
| - - uses: actions/checkout@v3 |
156 |
| - - name: Set up Python ${{ matrix.python-version.name }} |
157 |
| - uses: actions/setup-python@v4 |
158 |
| - with: |
159 |
| - python-version: ${{ matrix.python-version.name }} |
160 |
| - - name: Install dependencies |
161 |
| - run: > |
162 |
| - sudo apt-get update && |
163 |
| - sudo apt-get install -y libenchant-2-dev libxml2-dev libxslt-dev |
164 |
| - if: runner.os == 'Linux' && startsWith(matrix.python-version.toxenv, 'docs-') |
165 |
| - - name: Install dependencies |
166 |
| - run: brew install enchant |
167 |
| - if: runner.os == 'macOS' && startsWith(matrix.python-version.toxenv, 'docs-') |
168 |
| - - name: Install tox |
169 |
| - run: python -m pip install tox |
170 |
| - - name: Enable UTF-8 on Windows |
171 |
| - run: echo "PYTHONUTF8=1" >> $env:GITHUB_ENV |
172 |
| - if: runner.os == 'Windows' && startsWith(matrix.python-version.toxenv, 'py') |
173 |
| - - name: Run tox |
174 |
| - run: python -m tox -e "${{ matrix.python-version.toxenv }}" |
| 155 | + - uses: actions/checkout@v3 |
| 156 | + - name: Set up Python ${{ matrix.python-version.name }} |
| 157 | + uses: actions/setup-python@v4 |
| 158 | + with: |
| 159 | + python-version: ${{ matrix.python-version.name }} |
| 160 | + - name: Install dependencies |
| 161 | + run: > |
| 162 | + sudo apt-get update && |
| 163 | + sudo apt-get install -y libenchant-2-dev libxml2-dev libxslt-dev |
| 164 | + if: runner.os == 'Linux' && startsWith(matrix.python-version.toxenv, 'docs-') |
| 165 | + - name: Install dependencies |
| 166 | + run: brew install enchant |
| 167 | + if: runner.os == 'macOS' && startsWith(matrix.python-version.toxenv, 'docs-') |
| 168 | + - name: Install tox |
| 169 | + run: python -m pip install tox |
| 170 | + - name: Enable UTF-8 on Windows |
| 171 | + run: echo "PYTHONUTF8=1" >> $env:GITHUB_ENV |
| 172 | + if: runner.os == 'Windows' && startsWith(matrix.python-version.toxenv, 'py') |
| 173 | + - name: Run tox |
| 174 | + run: python -m tox -e "${{ matrix.python-version.toxenv }}" |
175 | 175 |
|
176 | 176 | packaging:
|
177 | 177 | needs: ci
|
178 | 178 | runs-on: ubuntu-latest
|
179 | 179 |
|
180 | 180 | steps:
|
181 |
| - - uses: actions/checkout@v3 |
182 |
| - with: |
183 |
| - fetch-depth: 0 |
184 |
| - - uses: actions/setup-python@v4 |
185 |
| - with: |
186 |
| - python-version: "3.10" |
187 |
| - - name: Install dependencies |
188 |
| - run: python -m pip install build |
189 |
| - - name: Create packages |
190 |
| - run: python -m build . |
191 |
| - - uses: actions/upload-artifact@v3 |
192 |
| - with: |
193 |
| - name: dist |
194 |
| - path: dist |
195 |
| - - name: Publish package |
196 |
| - if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') |
197 |
| - uses: pypa/gh-action-pypi-publish@release/v1 |
198 |
| - with: |
199 |
| - user: __token__ |
200 |
| - password: ${{ secrets.pypi_password }} |
201 |
| - - name: Create Release Notes |
202 |
| - if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') |
203 |
| - uses: actions/github-script@v6 |
204 |
| - with: |
205 |
| - github-token: ${{ secrets.GITHUB_TOKEN }} |
206 |
| - script: | |
207 |
| - await github.request(`POST /repos/${{ github.repository }}/releases`, { |
208 |
| - tag_name: "${{ github.ref }}", |
209 |
| - generate_release_notes: true |
210 |
| - }); |
| 181 | + - uses: actions/checkout@v3 |
| 182 | + with: |
| 183 | + fetch-depth: 0 |
| 184 | + - uses: actions/setup-python@v4 |
| 185 | + with: |
| 186 | + python-version: "3.10" |
| 187 | + - name: Install dependencies |
| 188 | + run: python -m pip install build |
| 189 | + - name: Create packages |
| 190 | + run: python -m build . |
| 191 | + - uses: actions/upload-artifact@v3 |
| 192 | + with: |
| 193 | + name: dist |
| 194 | + path: dist |
| 195 | + - name: Publish package |
| 196 | + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') |
| 197 | + uses: pypa/gh-action-pypi-publish@release/v1 |
| 198 | + with: |
| 199 | + user: __token__ |
| 200 | + password: ${{ secrets.pypi_password }} |
| 201 | + - name: Create Release Notes |
| 202 | + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') |
| 203 | + uses: actions/github-script@v6 |
| 204 | + with: |
| 205 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 206 | + script: | |
| 207 | + await github.request(`POST /repos/${{ github.repository }}/releases`, { |
| 208 | + tag_name: "${{ github.ref }}", |
| 209 | + generate_release_notes: true |
| 210 | + }); |
0 commit comments