Skip to content

Commit

Permalink
fix github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
alexarbogast committed Mar 7, 2024
1 parent 12cae94 commit ca0bdca
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 6 deletions.
3 changes: 0 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
# as binaries to avoid giant diffs
*.gcode filter=lfs diff=lfs merge=lfs -text

# remove noise from github language stats
*.gcode linguist-vendored
33 changes: 32 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,41 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: Packages
path: ./dist/pyrobopath-*

- uses: hynek/build-and-inspect-python-package@v2
upload_github:
name: Upload to Github Release
needs: [build]
runs-on: ubuntu-latest
permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
if: github.repository == 'alexarbogast/pyrobopath' && github.event_name == 'push' && github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
steps:
- uses: actions/download-artifact@v4
with:
name: Packages
path: dist
- uses: softprops/action-gh-release@v1
with:
files: dist/pyrobopath-*

upload_pypi_test:
name: Upload to PyPI (test)
environment: testpypi
needs: [build]
runs-on: ubuntu-latest
if: github.repository == 'alexarbogast/pyrobopath'
Expand All @@ -42,6 +72,7 @@ jobs:

upload_pypi:
name: Upload to PyPI (prod)
environment: pypi
needs: [build]
runs-on: ubuntu-latest
if: github.repository == 'alexarbogast/pyrobopath' && github.event_name == 'push' && github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
Expand Down
23 changes: 21 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Editors
.vscode/

### Python template
# Byte-compiled / optimized
__pycache__/
*.py[cod]
*$py.class

# Distribution / packaging
.env/
env/
.venv/
venv/
build/
dist/
.eggs/
lib/
lib64/
*.egg-info/

# Sphinx documentation
docs/_build/
docs/_api/
*build/
*.egg-info

0 comments on commit ca0bdca

Please sign in to comment.