Skip to content

Merge pull request #12 from Matter-and-Form/RC/9.0.1 #40

Merge pull request #12 from Matter-and-Form/RC/9.0.1

Merge pull request #12 from Matter-and-Form/RC/9.0.1 #40

Workflow file for this run

name: CD
on:
push:
branches:
- release
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- name: Update submodules
run: git submodule update --init --recursive
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Transpile Schema
run: |
python ./scripts/build_proto.py
- name: Build the package
run: python -m build
- name: Build Documentation
run: |
python3 ./scripts/build_doc.py
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
pip install twine
twine upload --verbose --repository pypi dist/*
- name: Extract version
id: extract_version
run: |
CURRENT_VERSION=$(grep -oP "(?<=__version__ = ')[^']*" ./three/__init__.py)
echo "TAG=$CURRENT_VERSION" >> $GITHUB_ENV
- name: Create Release
run: |
gh release create ${{ env.TAG }} \
--generate-notes \
--title "${{ env.TAG }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}