Skip to content

Merge branch 'main' of github.com:Loop3D/loopstructural-visualisation #17

Merge branch 'main' of github.com:Loop3D/loopstructural-visualisation

Merge branch 'main' of github.com:Loop3D/loopstructural-visualisation #17

Workflow file for this run

on:
push:
name: Release
jobs:
linting:
name: Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black ruff
- name: Autoformat with black
run: |
black .
- name: Lint with ruff
run: |
ruff check . --fix
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "style: style fixes by ruff and autoformatting by black"
make_sdist:
needs: ["linting"]
name: Make SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build SDist
run: |
pip install build
python -m build
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
release-please:
runs-on: ubuntu-latest
needs: ["linting","make_sdist"]
if: github.ref == 'refs/heads/main'
steps:
- uses: GoogleCloudPlatform/release-please-action@v4
id: release
with:
release-type: python
package-name: LoopStructural
version-file: LoopStructural/version.py
outputs:
release_created: ${{ steps.release.outputs.release_created }}
upload_to_pypi:
runs-on: "ubuntu-latest"
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
skip_existing: true
verbose: true