stuff #11
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 | |
on: | |
push: | |
branches: [main] | |
paths-ignore: | |
- "**.md" | |
- "img/**" | |
pull_request: | |
branches: [main] | |
paths-ignore: | |
- "**.md" | |
- "img/**" | |
workflow_dispatch: | |
inputs: | |
manual: | |
description: "Trigger the workflow manually" | |
required: false | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Get Current Required Python Version | |
id: get-python-versions | |
run: | | |
MINIMUM_VERSION=$(grep -oP '__version_minimum_python__ = "\K.*(?=")' hn_sdk/_version.py) | |
echo "CURRENT_VERSION=$MINIMUM_VERSION" >> $GITHUB_ENV | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ env.CURRENT_VERSION }} | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
make deps-dev | |
- name: Build Package | |
run: make pkg-build | |
- name: Check Package | |
run: | | |
twine check dist/* |