|
3 | 3 | test-and-deploy:
|
4 | 4 | runs-on: ubuntu-latest
|
5 | 5 | steps:
|
6 |
| - - uses: actions/checkout@v4 |
7 |
| - - uses: actions/setup-python@v5 |
8 |
| - with: |
9 |
| - python-version: '3.10' |
| 6 | + - uses: actions/checkout@v4 |
| 7 | + - uses: actions/setup-python@v5 |
| 8 | + with: |
| 9 | + python-version: "3.13" |
10 | 10 |
|
11 |
| - - name: Run tests |
12 |
| - run: | |
13 |
| - pip install . |
14 |
| - style50 --help |
| 11 | + - name: Run tests |
| 12 | + run: | |
| 13 | + pip install . |
| 14 | + style50 --help |
15 | 15 |
|
16 |
| - - name: Install pypa/build |
17 |
| - run: python -m pip install build --user |
| 16 | + - name: Install pypa/build |
| 17 | + run: python -m pip install build --user |
18 | 18 |
|
19 |
| - - name: Build a binary wheel and a source tarball |
20 |
| - run: python -m build --sdist --wheel --outdir dist/ . |
| 19 | + - name: Build a binary wheel and a source tarball |
| 20 | + run: python -m build --sdist --wheel --outdir dist/ . |
21 | 21 |
|
22 |
| - - name: Deploy to PyPI |
23 |
| - if: ${{ github.ref == 'refs/heads/main' }} |
24 |
| - uses: pypa/gh-action-pypi-publish@release/v1 |
25 |
| - with: |
26 |
| - user: __token__ |
27 |
| - password: ${{ secrets.PYPI_API_TOKEN }} |
| 22 | + - name: Deploy to PyPI |
| 23 | + if: ${{ github.ref == 'refs/heads/main' }} |
| 24 | + uses: pypa/gh-action-pypi-publish@release/v1 |
| 25 | + with: |
| 26 | + user: __token__ |
| 27 | + password: ${{ secrets.PYPI_API_TOKEN }} |
28 | 28 |
|
29 |
| - - name: Extract program version |
30 |
| - id: program_version |
31 |
| - run: | |
32 |
| - echo ::set-output name=version::$(style50 --version | cut --delimiter ' ' --fields 2) |
| 29 | + - name: Extract program version |
| 30 | + id: program_version |
| 31 | + run: | |
| 32 | + echo ::set-output name=version::$(style50 --version | cut --delimiter ' ' --fields 2) |
33 | 33 |
|
34 |
| - - name: Create Release |
35 |
| - if: ${{ github.ref == 'refs/heads/main' }} |
36 |
| - uses: actions/github-script@v7 |
37 |
| - with: |
38 |
| - github-token: ${{ github.token }} |
39 |
| - script: | |
40 |
| - github.rest.repos.createRelease({ |
41 |
| - owner: context.repo.owner, |
42 |
| - repo: context.repo.repo, |
43 |
| - tag_name: "v${{ steps.program_version.outputs.version }}", |
44 |
| - tag_commitish: "${{ github.sha }}" |
45 |
| - }) |
| 34 | + - name: Create Release |
| 35 | + if: ${{ github.ref == 'refs/heads/main' }} |
| 36 | + uses: actions/github-script@v7 |
| 37 | + with: |
| 38 | + github-token: ${{ github.token }} |
| 39 | + script: | |
| 40 | + github.rest.repos.createRelease({ |
| 41 | + owner: context.repo.owner, |
| 42 | + repo: context.repo.repo, |
| 43 | + tag_name: "v${{ steps.program_version.outputs.version }}", |
| 44 | + tag_commitish: "${{ github.sha }}" |
| 45 | + }) |
0 commit comments