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