Added Docker image #10
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: Build | |
| on: | |
| push: | |
| branches: ['main'] | |
| tags: ['*'] | |
| permissions: | |
| contents: write | |
| jobs: | |
| draft-release: | |
| name: Draft-release | |
| runs-on: ubuntu-slim | |
| # Runs when a tag is pushed | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Create draft release | |
| run: | | |
| gh release create "${{ github.ref_name }}" --title "img-DB ${{ github.ref_name }}" --repo "croqaz/img-db" --draft | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| build-app: | |
| name: Build-binaries | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| # Runs when a tag is pushed | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: 3.14 | |
| - name: Build release files | |
| run: | | |
| uv sync | |
| make build | |
| - name: Upload build files | |
| run: | | |
| mv dist/imgdb "imgdb-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m)" | |
| gh release upload "${{ github.ref_name }}" imgdb-* --repo "croqaz/img-db" --clobber | |
| env: | |
| GH_TOKEN: ${{ github.token }} |