Merge branch 'main' of https://github.com/ArchwayTrust/Fabric-PythonH… #4
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: Build and Update Python Package | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install build | |
- name: Clear dist directory | |
run: rm -rf dist/* | |
- name: Build package | |
run: python -m build | |
- name: Configure Git | |
run: | | |
git config --global user.name 'Ben Dobbs' | |
git config --global user.email 'bdobbs@archwaytrust.co.uk' | |
- name: Commit and push | |
run: | | |
git add dist/* | |
git commit -m "Update distribution files" | |
# This will push the changes to the main branch | |
git push | |