From f419da46c68faf91c083f07ddb17997f04adbd7a Mon Sep 17 00:00:00 2001 From: Ian Hunt-Isaak Date: Fri, 19 Feb 2021 12:59:50 -0500 Subject: [PATCH] add github action for releasing --- .github/workflows/release.yml | 41 +++++++++++++++++++++++++++++++++++ 1 file changed, 41 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..6cdebcf --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,41 @@ +name: Publish Package + +on: + release: + types: [published] + +defaults: + run: + shell: bash -l {0} + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install node + uses: actions/setup-node@v1 + with: + node-version: '13.x' + registry-url: 'https://registry.npmjs.org' + + - name: Install Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build twine jupyter-packaging + + - name: Build package + run: python -m build + + - name: Publish the Python package + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + run: twine upload dist/*