Add deploy workflow and move ci to test
authorJosh Roesslein <jroesslein@gmail.com>
Wed, 8 Jul 2020 04:03:22 +0000 (21:03 -0700)
committerJosh Roesslein <jroesslein@gmail.com>
Wed, 8 Jul 2020 04:03:22 +0000 (21:03 -0700)
.github/workflows/deploy.yml [new file with mode: 0644]
.github/workflows/test.yml [moved from .github/workflows/ci.yml with 98% similarity]

diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
new file mode 100644 (file)
index 0000000..60c285e
--- /dev/null
@@ -0,0 +1,27 @@
+name: Deploy
+
+on:
+  release:
+    types: [created]
+
+jobs:
+  deploy:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+      - name: Setup Python
+        uses: actions/setup-python@v2
+        with:
+          python-version: '3.x'
+      - name: Install dependencies
+        run: |
+          python -m pip install --upgrade pip
+          pip install setuptools wheel twine
+      - name: Build and publish
+        env:
+          TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
+          TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
+        run: |
+          python setup.py dist bdist_wheel
+          twine upload dist/*
+
similarity index 98%
rename from .github/workflows/ci.yml
rename to .github/workflows/test.yml
index 7bc13afc48805e5e0030a60f891162f3b9d8f193..80a1a531a58a2ef69d8dab96f96a402a81ca9452 100644 (file)
@@ -1,4 +1,4 @@
-name: ci
+name: test
 
 on: [push, pull_request]