From c46687376ccc50c8fea6cb8617e22e4b4dd1924a Mon Sep 17 00:00:00 2001 From: Cristian Garcia Date: Fri, 4 Feb 2022 16:48:54 -0500 Subject: [PATCH] Release CI (#61) * test change publish * on PR * use secrets * split release * only on release --- .../{update_pages.yml => release.yml} | 34 +++++++++++++++++-- .github/workflows/{ci_test.yml => test.yml} | 0 2 files changed, 31 insertions(+), 3 deletions(-) rename .github/workflows/{update_pages.yml => release.yml} (51%) rename .github/workflows/{ci_test.yml => test.yml} (100%) diff --git a/.github/workflows/update_pages.yml b/.github/workflows/release.yml similarity index 51% rename from .github/workflows/update_pages.yml rename to .github/workflows/release.yml index f67a403a..11962d02 100644 --- a/.github/workflows/update_pages.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: Update GitHub Pages on: release: jobs: - build-and-deploy: + publish-docs: runs-on: ubuntu-latest steps: - name: Checkout 🛎️ @@ -22,15 +22,43 @@ jobs: run: | poetry config virtualenvs.create false poetry install - + - name: Build Docs 🔨 run: | cp README.md docs/index.md python scripts/update_docs.py mkdocs build - - name: Deploy 🚀 + - name: Deploy Page 🚀 uses: JamesIves/github-pages-deploy-action@4.1.6 with: branch: gh-pages folder: site + + publish-package: + runs-on: ubuntu-latest + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v2.3.1 + + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Install Poetry 📖 + uses: snok/install-poetry@v1.1.1 + with: + version: 1.1.4 + + - name: Install Dependencies + run: | + poetry config virtualenvs.create false + poetry install + + - name: Publish to PyPI + run: | + poetry build + poetry publish \ + --username ${{ secrets.PYPI_USERNAME }} \ + --password ${{ secrets.PYPI_PASSWORD }} diff --git a/.github/workflows/ci_test.yml b/.github/workflows/test.yml similarity index 100% rename from .github/workflows/ci_test.yml rename to .github/workflows/test.yml