This repository was archived by the owner on Jun 13, 2026. It is now read-only.
Release #3
Workflow file for this run
This file contains hidden or 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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version to release (e.g., 1.2.3)' | |
| required: true | |
| type: string | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ${{ github.repository }} | |
| jobs: | |
| build-and-push: | |
| name: Build and Push Release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| packages: write | |
| id-token: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Needed for git describe | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Determine version | |
| id: version | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| VERSION="v${{ github.event.inputs.version }}" | |
| else | |
| VERSION="${GITHUB_REF#refs/tags/}" | |
| fi | |
| echo "version=${VERSION}" >> $GITHUB_OUTPUT | |
| echo "version_number=${VERSION#v}" >> $GITHUB_OUTPUT | |
| - name: Build and push with build.py | |
| run: | | |
| # Install Python dependencies for build script | |
| pip install rich | |
| # Build and push with the specific version tag | |
| python build.py --version-tag ${{ steps.version.outputs.version_number }} | |
| # Additional tags for releases | |
| docker tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:v${{ steps.version.outputs.version_number }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest | |
| docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest | |
| # Create major and minor version tags | |
| MAJOR=$(echo ${{ steps.version.outputs.version_number }} | cut -d. -f1) | |
| MINOR=$(echo ${{ steps.version.outputs.version_number }} | cut -d. -f1,2) | |
| docker tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:v${{ steps.version.outputs.version_number }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:v${MAJOR} | |
| docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:v${MAJOR} | |
| docker tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:v${{ steps.version.outputs.version_number }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:v${MINOR} | |
| docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:v${MINOR} | |
| - name: Generate SBOM | |
| uses: anchore/sbom-action@v0 | |
| with: | |
| image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version }} | |
| format: spdx-json | |
| output-file: sbom.spdx.json | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.version.outputs.version }} | |
| name: Release ${{ steps.version.outputs.version }} | |
| draft: false | |
| prerelease: ${{ contains(steps.version.outputs.version, 'beta') || contains(steps.version.outputs.version, 'alpha') }} | |
| generate_release_notes: true | |
| files: | | |
| sbom.spdx.json | |
| body: | | |
| ## Docker Images | |
| Pull the image: | |
| ```bash | |
| docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version }} | |
| docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest | |
| ``` | |
| Run the container: | |
| ```bash | |
| docker run -v $(pwd)/data:/app/data \ | |
| ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version }} | |
| ``` | |
| ## What's Changed | |
| See the full changelog below. | |