Add Poetry as package manager | added github actions for publishing upon release creation #3
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
name: Python + frontend CI | |
on: | |
pull_request: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
prepare: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Load cached Poetry installation | |
uses: actions/cache@v3 | |
with: | |
path: ~/.local | |
key: poetry-${{ runner.os }} | |
- uses: ./.github/actions/python_prepare | |
- name: Cache Poetry dependencies | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |
build_python: | |
runs-on: ubuntu-latest | |
needs: | |
- prepare | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Restore Poetry installation | |
uses: actions/cache@v3 | |
with: | |
path: ~/.local | |
key: poetry-${{ runner.os }} | |
- name: Restore Poetry dependencies | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Run poetry build | |
run: | | |
export PATH="$HOME/.local/bin:$PATH" | |
poetry build -f wheel | |
build_frontend: | |
runs-on: ubuntu-latest | |
needs: | |
- prepare | |
steps: | |
- name: Build Frontend | |
env: | |
CI: false # needed otherwise dependencies warnings stop the job | |
run: yarn --cwd python_web3_wallet/frontend build |