This GitHub Action automates the process of building and publishing the project. It triggers automatically after a version bump or when a tag (v*.*.*
) is pushed. The workflow builds the package and optionally publishes it to a package registry.
The workflow runs in the following scenarios:
- After Bump Version workflow completes.
- When a new tag (
v*.*.*
) is pushed to the repository.
- Triggered by:
- Completion of
1. Bump Version
workflow. - Push event on tags matching
v*.*.*
.
- Completion of
This job builds the package and creates a release.
- Runs on:
ubuntu-22.04
- Permissions:
contents: write
- Steps:
- Checkout the repository
- Set up Python 3.9
- Install dependencies (from
requirements/requirements.build.txt
) - Build the package using
./scripts/build.sh -c
- Create a release using GitHub CLI (
gh release create
)
This workflow runs automatically when a new version is tagged. However, you can manually trigger a tag and push it:
-
Bump the version using the
1. Bump Version
workflow. -
Create a tag manually and push it:
git tag v1.2.3 git push origin v1.2.3
-
The workflow will build and publish the package.
GITHUB_TOKEN
: Used for creating GitHub releases.PYPI_API_TOKEN
(if enabled): Used for publishing packages to PyPI.
build.sh
: Builds the package.get-version.sh
: Retrieves the current version.
- This workflow supports both GitHub Releases and optional package publishing.
- Ensure
build.sh
is executable and correctly configured. - If the workflow fails, check logs for errors related to dependencies or authentication.
- If the build step fails, ensure dependencies are correctly installed.
- If release creation fails, verify that
GITHUB_TOKEN
has the necessary permissions. - If publishing to PyPI fails, check that the API token is correctly set up in repository secrets.