-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add release flow with publishing to pypi
- Loading branch information
Showing
6 changed files
with
69 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Release | ||
|
||
#on: | ||
# release: | ||
# types: | ||
# - 'published' | ||
|
||
on: | ||
push: | ||
|
||
env: | ||
PYTHON_VERSION: 3.9 | ||
|
||
jobs: | ||
build-and-publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 🐍 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
- name: Cache Poetry virtualenv 💾 | ||
uses: actions/cache@v1 | ||
id: poetry-cache | ||
with: | ||
path: .venv | ||
key: poetry-${{ env.PYTHON_VERSION }}-${{ hashFiles('**/poetry.lock') }} | ||
|
||
- name: Install Poetry 📖 | ||
run: | | ||
pip install poetry | ||
poetry config virtualenvs.in-project true | ||
- name: Install dependencies 📌 | ||
if: steps.poetry-cache.outputs.cache-hit != 'true' | ||
run: | | ||
poetry install | ||
- name: Build package 📦 | ||
run: | | ||
poetry run scripts/build.sh | ||
- name: Upload package build to artifacts ☁️ | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: package | ||
path: dist | ||
if-no-files-found: error | ||
|
||
- name: Publish package ⬆️ | ||
run: | | ||
poetry run scripts/publish.sh | ||
env: | ||
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,3 @@ | |
set -x | ||
|
||
poetry build | ||
mkdocs build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh -e | ||
|
||
set -x | ||
|
||
poetry build |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh -e | ||
|
||
set -x | ||
|
||
poetry publish |