diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-04-13 16:50:38 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-04-13 16:50:38 +0300 |
commit | b3350b551cac7c6227407d226e024441c0706ad8 (patch) | |
tree | 361f6fa000a00c4d069b2574082058af9209f3a0 /.github | |
parent | add packaging metadata (diff) | |
download | cmake-common-b3350b551cac7c6227407d226e024441c0706ad8.tar.gz cmake-common-b3350b551cac7c6227407d226e024441c0706ad8.zip |
workflows/basic: add job for publishing to PyPI
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/basic.yml | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml index f9b9c8f..c2a1d22 100644 --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -18,7 +18,7 @@ jobs: - name: Run clang-format run: ./tools/clang-format.py --clang-format clang-format-10 - build: + basic: strategy: matrix: os: [ubuntu-18.04, windows-2016, windows-2019] @@ -83,3 +83,32 @@ jobs: if (Compare-Object $actual $expected -CaseSensitive) { throw 'Unexpected output' } + + publish: + # TODO: figure out how to add a dependency on the *toolsets workflows. + needs: [lint, basic] + runs-on: ubuntu-20.04 + name: Publish + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3 + - name: Install tools + run: python3 -m pip install --upgrade build + - name: Build package + run: python3 -m build + - name: Upload dist + uses: actions/upload-artifact@v2 + with: + name: dist + path: dist + if-no-files-found: error + - name: Publish package + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} |