From 5b0ea87d63e261221e4ded157847bbded973dca7 Mon Sep 17 00:00:00 2001 From: Kevin Paul Date: Thu, 11 Nov 2021 15:45:39 -0700 Subject: [PATCH 1/3] Adding PyPI release action --- .github/workflows/release.yml | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..b4853d1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,37 @@ +name: Build distribution + +on: [push, pull_request] + +jobs: + test: + runs-on: "ubuntu-latest" + + steps: + - name: Checkout source + uses: actions/checkout@v2 + + - name: Set up Python 3.8 + uses: actions/setup-python@v1 + with: + python-version: 3.8 + + - name: Install pypa/build + run: python -m pip install build wheel + + - name: Build distributions + shell: bash -l {0} + run: python setup.py sdist bdist_wheel + + - name: Publish package to TestPyPI + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.TEST_PYPI_API_TOKEN }} + repository_url: https://test.pypi.org/legacy/ + + - name: Publish package to PyPI + if: github.repository == 'dask/dask-mpi' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} From 20f96e4747b9c773abfd8ef9f27fd346f08c3afe Mon Sep 17 00:00:00 2001 From: Kevin Paul Date: Thu, 11 Nov 2021 15:51:19 -0700 Subject: [PATCH 2/3] Install pyyaml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b4853d1..9187896 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: python-version: 3.8 - name: Install pypa/build - run: python -m pip install build wheel + run: python -m pip install build wheel pyyaml - name: Build distributions shell: bash -l {0} From 0270d2342fe245bc936d7826530935e63c35b927 Mon Sep 17 00:00:00 2001 From: Kevin Paul Date: Thu, 11 Nov 2021 15:53:18 -0700 Subject: [PATCH 3/3] Remove TestPyPI step --- .github/workflows/release.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9187896..1b4ed12 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,13 +22,6 @@ jobs: shell: bash -l {0} run: python setup.py sdist bdist_wheel - - name: Publish package to TestPyPI - uses: pypa/gh-action-pypi-publish@master - with: - user: __token__ - password: ${{ secrets.TEST_PYPI_API_TOKEN }} - repository_url: https://test.pypi.org/legacy/ - - name: Publish package to PyPI if: github.repository == 'dask/dask-mpi' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@master