Skip to content

Add missing quote

Add missing quote #4

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python package
on:
push:
branches: [ "main" ]
workflow_dispatch:
jobs:
create_release:
runs-on: ubuntu-latest
outputs:
RELEASE_NAME: klipper-${{ steps.version_number.outputs.KLIPPY_VERSION }}
steps:
- uses: actions/checkout@v3
- name: Get version number
id: version_number
run: |
tee <<<"KLIPPY_VERSION=$(cat klippy/.version)" -a "$GITHUB_OUTPUT"
- name: Create tag+release if not yet present
env:
KLIPPY_VERSION: ${{ steps.version_number.outputs.KLIPPY_VERSION }}
run: |
git tag --force -am "Kilpper at $KLIPPY_VERSION" klipper-$KLIPPY_VERSION
git push -f origin klipper-$KLIPPY_VERSION
if ! gh release view "klipper-$KLIPPY_VERSION" >/dev/null; then
gh release create "klipper-$KLIPPY_VERSION"
fi
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build sdist
run: |
python -m build --sdist
- name: Upload sdist
uses: actions/upload-artifact@v3.1.3
with:
name: sdist
path: dist/*.tar.gz
upload:
runs-on: ubuntu-latest
needs:
- create_release
- build
steps:
- uses: actions/download-artifact@master
with:
name: sdist
path: dist/*.tar.gz
- name: upload to release
env:
RELEASE_NAME: ${{ needs.create_release.outputs.RELEASE_NAME }}
run: |
gh release upload "$RELEASE_NAME" dist/*.tar.gz --clobber