Skip to content

Greatly modify scope resolution mechanics, bump minor version #13

Greatly modify scope resolution mechanics, bump minor version

Greatly modify scope resolution mechanics, bump minor version #13

name: Test and Publish
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: pip install ruamel-yaml
- name: Run tests
run: python3 tests.py
env:
yamlet_stress: full
publish:
needs: test # Run only if tests pass
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/yamlet-')
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: pip install setuptools wheel twine build
- name: Clean up dist folder # Just in case a human is trying to run this
run: rm -rf dist # Ensures only fresh builds are in dist
- name: Build package
run: python -m build
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__ # Use PyPI token for authentication
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*