fork/mons

git clone https://git.julia.blue/fork/mons

coloursofnoiseFix packaged manpage build step in release pipelinef973665

main
1.3 KiB51 linesraw
1name: Publish build to PyPI
2
3on:
4  push:
5    tags:
6      - 'v*'
7
8jobs:
9  test:
10    uses: coloursofnoise/mons/.github/workflows/test.yml@main
11
12  build-and-publish:
13    needs: test
14    runs-on: ubuntu-latest
15
16    steps:
17      - uses: actions/checkout@v3
18        with:
19          fetch-depth: 0
20      - name: Set up Python 3.11
21        uses: actions/setup-python@v2
22        with:
23          python-version: '3.11'
24
25      - name: Install dependencies
26        run: |
27          python -m pip install --upgrade pip
28          python -m pip install .
29          python -m pip install -r requirements-dev.txt
30
31      - name: Generate packaged manual pages
32        run: sphinx-build -b man -W docs mons/man -d docs/_build
33        env:
34          TZ: UTC
35
36      - name: Install pypa/build
37        run: python -m pip install build --user
38      - name: Build wheel and source tarball
39        run: python -m build --outdir dist/ .
40
41      - name: Publish distribution to TestPyPI
42        uses: pypa/gh-action-pypi-publish@release/v1
43        with:
44          user: __token__
45          password: ${{ secrets.TEST_PYPI_API_TOKEN }}
46          repository_url: https://test.pypi.org/legacy/
47      - name: Publish distribution to PyPI
48        uses: pypa/gh-action-pypi-publish@release/v1
49        with:
50          user: __token__
51          password: ${{ secrets.PYPI_API_TOKEN }}