|
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.10" |
20 |
| - - uses: pre-commit/[email protected] |
| 16 | + - uses: actions/checkout@v3 |
| 17 | + - uses: actions/setup-python@v4 |
| 18 | + with: |
| 19 | + python-version: "3.10" |
| 20 | + - uses: pre-commit/[email protected] |
21 | 21 |
|
22 | 22 | ci:
|
23 | 23 | runs-on: ${{ matrix.os }}
|
@@ -74,55 +74,55 @@ jobs:
|
74 | 74 | toxenv: style
|
75 | 75 |
|
76 | 76 | steps:
|
77 |
| - - uses: actions/checkout@v3 |
78 |
| - - name: Set up Python |
79 |
| - uses: actions/setup-python@v4 |
80 |
| - with: |
81 |
| - python-version: ${{ matrix.python-version.name }} |
82 |
| - - name: Install dependencies |
83 |
| - run: > |
84 |
| - sudo apt-get update && |
85 |
| - sudo apt-get install -y libenchant-dev libxml2-dev libxslt-dev |
86 |
| - if: runner.os == 'Linux' && startsWith(matrix.python-version.toxenv, 'docs-') |
87 |
| - - name: Install dependencies |
88 |
| - run: brew install enchant |
89 |
| - if: runner.os == 'macOS' && startsWith(matrix.python-version.toxenv, 'docs-') |
90 |
| - - name: Install tox |
91 |
| - run: python -m pip install tox |
92 |
| - - name: Run tox |
93 |
| - run: python -m tox -e "${{ matrix.python-version.toxenv }}" |
| 77 | + - uses: actions/checkout@v3 |
| 78 | + - name: Set up Python |
| 79 | + uses: actions/setup-python@v4 |
| 80 | + with: |
| 81 | + python-version: ${{ matrix.python-version.name }} |
| 82 | + - name: Install dependencies |
| 83 | + run: > |
| 84 | + sudo apt-get update && |
| 85 | + sudo apt-get install -y libenchant-dev libxml2-dev libxslt-dev |
| 86 | + if: runner.os == 'Linux' && startsWith(matrix.python-version.toxenv, 'docs-') |
| 87 | + - name: Install dependencies |
| 88 | + run: brew install enchant |
| 89 | + if: runner.os == 'macOS' && startsWith(matrix.python-version.toxenv, 'docs-') |
| 90 | + - name: Install tox |
| 91 | + run: python -m pip install tox |
| 92 | + - name: Run tox |
| 93 | + run: python -m tox -e "${{ matrix.python-version.toxenv }}" |
94 | 94 |
|
95 | 95 | packaging:
|
96 | 96 | needs: ci
|
97 | 97 | runs-on: ubuntu-latest
|
98 | 98 |
|
99 | 99 | steps:
|
100 |
| - - uses: actions/checkout@v3 |
101 |
| - - name: Set up Python |
102 |
| - uses: actions/setup-python@v4 |
103 |
| - with: |
104 |
| - python-version: "3.10" |
105 |
| - - name: Install dependencies |
106 |
| - run: python -m pip install build |
107 |
| - - name: Create packages |
108 |
| - run: python -m build . |
109 |
| - - uses: actions/upload-artifact@v3 |
110 |
| - with: |
111 |
| - name: dist |
112 |
| - path: dist |
113 |
| - - name: Publish package |
114 |
| - if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') |
115 |
| - uses: pypa/gh-action-pypi-publish@release/v1 |
116 |
| - with: |
117 |
| - user: __token__ |
118 |
| - password: ${{ secrets.pypi_password }} |
119 |
| - - name: Create Release Notes |
120 |
| - if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') |
121 |
| - uses: actions/github-script@v6 |
122 |
| - with: |
123 |
| - github-token: ${{ secrets.GITHUB_TOKEN }} |
124 |
| - script: | |
125 |
| - await github.request(`POST /repos/${{ github.repository }}/releases`, { |
126 |
| - tag_name: "${{ github.ref }}", |
127 |
| - generate_release_notes: true |
128 |
| - }); |
| 100 | + - uses: actions/checkout@v3 |
| 101 | + - name: Set up Python |
| 102 | + uses: actions/setup-python@v4 |
| 103 | + with: |
| 104 | + python-version: "3.10" |
| 105 | + - name: Install dependencies |
| 106 | + run: python -m pip install build |
| 107 | + - name: Create packages |
| 108 | + run: python -m build . |
| 109 | + - uses: actions/upload-artifact@v3 |
| 110 | + with: |
| 111 | + name: dist |
| 112 | + path: dist |
| 113 | + - name: Publish package |
| 114 | + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') |
| 115 | + uses: pypa/gh-action-pypi-publish@release/v1 |
| 116 | + with: |
| 117 | + user: __token__ |
| 118 | + password: ${{ secrets.pypi_password }} |
| 119 | + - name: Create Release Notes |
| 120 | + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') |
| 121 | + uses: actions/github-script@v6 |
| 122 | + with: |
| 123 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 124 | + script: | |
| 125 | + await github.request(`POST /repos/${{ github.repository }}/releases`, { |
| 126 | + tag_name: "${{ github.ref }}", |
| 127 | + generate_release_notes: true |
| 128 | + }); |
0 commit comments