v0.0dev72 #78
Workflow file for this run
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: Publish Package to PyPI | |
on: | |
release: | |
types: [created] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Build and Copy Dev | |
run: | | |
npm install --global yarn | |
cd zt_frontend | |
yarn install | |
yarn run build | |
cd .. | |
rm -rf zt_backend/dist_dev | |
mkdir -p zt_backend/dist_dev | |
cp -r zt_frontend/dist/* zt_backend/dist_dev | |
- name: Build and Copy App | |
run: | | |
cd zt_frontend | |
yarn install | |
yarn run buildapp | |
cd .. | |
rm -rf zt_backend/dist_app | |
mkdir -p zt_backend/dist_app | |
cp -r zt_frontend/dist/* zt_backend/dist_app | |
- name: Build Package | |
run: | | |
cd copilot | |
yarn install | |
cd .. | |
pip install build | |
python -m build | |
- name: Store the distribution packages | |
uses: actions/upload-artifact@v3 | |
with: | |
name: python-package-distributions | |
path: dist/ | |
publish-to-pypi: | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
environment: | |
name: pypi | |
url: https://pypi.org/p/zero-true | |
permissions: | |
id-token: write | |
steps: | |
- name: Download all the dists | |
uses: actions/download-artifact@v3 | |
with: | |
name: python-package-distributions | |
path: dist/ | |
- name: Publish distribution 📦 to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |