Update api template usage #714
Workflow file for this run
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: Package Build | |
on: | |
push: | |
branches: [main] | |
tags: ['*'] | |
pull_request: | |
branches: [main] | |
workflow_call: | |
inputs: | |
package-name: | |
description: The name of the package being installed. | |
required: true | |
type: string | |
jobs: | |
# Verify the package builds fine | |
build-package: | |
name: Build package | |
runs-on: ubuntu-latest | |
environment: package-build | |
env: | |
PACKAGE_NAME: ${{ inputs.package-name || 'tm_devices' }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: hynek/build-and-inspect-python-package@v2.4.0 | |
id: build-pkg | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: x # any version | |
check-latest: true | |
- name: Test installing wheel | |
run: | | |
pip install ${{ steps.build-pkg.outputs.dist }}/*.whl | |
pip uninstall --yes "$PACKAGE_NAME" | |
- name: Test installing tarball | |
run: |- | |
pip install ${{ steps.build-pkg.outputs.dist }}/*.tar.gz | |
pip uninstall --yes "$PACKAGE_NAME" |