mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2025-12-18 08:30:13 +01:00
chore(release): v2.2.7
This commit is contained in:
parent
6fe8a7af89
commit
45658d0b72
6 changed files with 247 additions and 87 deletions
233
.github/workflows/dockerhub-publish.yml
vendored
233
.github/workflows/dockerhub-publish.yml
vendored
|
|
@ -7,11 +7,16 @@ on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
prepare:
|
||||||
|
name: Prepare metadata
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
outputs:
|
||||||
|
version: ${{ steps.notes.outputs.version }}
|
||||||
|
desc: ${{ steps.notes.outputs.desc }}
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5.0.0
|
uses: actions/checkout@v5.0.0
|
||||||
|
|
@ -29,43 +34,10 @@ jobs:
|
||||||
echo >> RELEASE_NOTES.md
|
echo >> RELEASE_NOTES.md
|
||||||
echo "Automated release." >> RELEASE_NOTES.md
|
echo "Automated release." >> RELEASE_NOTES.md
|
||||||
fi
|
fi
|
||||||
# Escape newlines for label usage
|
|
||||||
DESC=$(awk 'BEGIN{ORS="\\n"} {print}' RELEASE_NOTES.md)
|
DESC=$(awk 'BEGIN{ORS="\\n"} {print}' RELEASE_NOTES.md)
|
||||||
echo "desc=$DESC" >> $GITHUB_OUTPUT
|
echo "desc=$DESC" >> $GITHUB_OUTPUT
|
||||||
echo "version=$VERSION_REF" >> $GITHUB_OUTPUT
|
echo "version=$VERSION_REF" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3.6.0
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3.11.1
|
|
||||||
|
|
||||||
- name: Smoke test image boots Web UI by default (amd64)
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
# Build a local test image (amd64) and load into docker
|
|
||||||
docker buildx build --platform linux/amd64 --load -t mtg-deckbuilder:test --build-arg APP_VERSION=${{ steps.notes.outputs.version }} .
|
|
||||||
# Run container and wait for it to serve on 8080
|
|
||||||
docker rm -f mtg-smoke 2>/dev/null || true
|
|
||||||
docker run -d --name mtg-smoke -p 8080:8080 mtg-deckbuilder:test
|
|
||||||
echo "Waiting for Web UI..."
|
|
||||||
for i in {1..30}; do
|
|
||||||
if curl -fsS http://localhost:8080/ >/dev/null; then echo "Up"; break; fi
|
|
||||||
sleep 2
|
|
||||||
done
|
|
||||||
# Final assert; print logs on failure
|
|
||||||
if ! curl -fsS http://localhost:8080/ >/dev/null; then
|
|
||||||
echo "Web UI did not start in time. Container logs:" && docker logs mtg-smoke || true
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
docker rm -f mtg-smoke >/dev/null 2>&1 || true
|
|
||||||
|
|
||||||
- name: Docker Hub login
|
|
||||||
uses: docker/login-action@v3.5.0
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Extract Docker metadata
|
- name: Extract Docker metadata
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5.8.0
|
uses: docker/metadata-action@v5.8.0
|
||||||
|
|
@ -81,15 +53,196 @@ jobs:
|
||||||
org.opencontainers.image.description=${{ steps.notes.outputs.desc }}
|
org.opencontainers.image.description=${{ steps.notes.outputs.desc }}
|
||||||
org.opencontainers.image.revision=${{ github.sha }}
|
org.opencontainers.image.revision=${{ github.sha }}
|
||||||
|
|
||||||
- name: Build and push
|
build_amd64:
|
||||||
|
name: Build (amd64)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: prepare
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
outputs:
|
||||||
|
digest: ${{ steps.build.outputs.digest }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v5.0.0
|
||||||
|
|
||||||
|
- name: Prepare amd64 tag list
|
||||||
|
id: arch_tags
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "Generating amd64 tag variants" >&2
|
||||||
|
TAGS='${{ needs.prepare.outputs.tags }}'
|
||||||
|
echo "$TAGS" | sed 's/$/-amd64/' | grep . > tags.txt
|
||||||
|
echo "Computed tags:" >&2; cat tags.txt >&2
|
||||||
|
echo "tags<<EOF" >> $GITHUB_OUTPUT
|
||||||
|
cat tags.txt >> $GITHUB_OUTPUT
|
||||||
|
echo "EOF" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Docker Hub login
|
||||||
|
uses: docker/login-action@v3.5.0
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3.11.1
|
||||||
|
|
||||||
|
- name: Smoke test Web UI (local build)
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
APP_VERSION: ${{ needs.prepare.outputs.version }}
|
||||||
|
run: |
|
||||||
|
docker buildx build --platform linux/amd64 --load -t mtg-deckbuilder:test --build-arg APP_VERSION=$APP_VERSION .
|
||||||
|
docker rm -f mtg-smoke 2>/dev/null || true
|
||||||
|
docker run -d --name mtg-smoke -p 8080:8080 mtg-deckbuilder:test
|
||||||
|
echo "Waiting for Web UI (amd64)..."
|
||||||
|
for i in {1..30}; do
|
||||||
|
if curl -fsS http://localhost:8080/ >/dev/null; then echo "Up"; break; fi
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
if ! curl -fsS http://localhost:8080/ >/dev/null; then
|
||||||
|
echo "Web UI did not start in time. Logs:" && docker logs mtg-smoke || true
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
docker rm -f mtg-smoke >/dev/null 2>&1 || true
|
||||||
|
|
||||||
|
- name: Build & push arch image (amd64)
|
||||||
|
id: build
|
||||||
uses: docker/build-push-action@v6.18.0
|
uses: docker/build-push-action@v6.18.0
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.arch_tags.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ needs.prepare.outputs.labels }}
|
||||||
build-args: |
|
build-args: |
|
||||||
APP_VERSION=${{ steps.notes.outputs.version }}
|
APP_VERSION=${{ needs.prepare.outputs.version }}
|
||||||
|
|
||||||
|
build_arm64_native:
|
||||||
|
name: Build (arm64 native)
|
||||||
|
# Native ARM64 GitHub hosted runner; if unavailable replace with self-hosted label
|
||||||
|
runs-on: ubuntu-24.04-arm64
|
||||||
|
needs: prepare
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
continue-on-error: true
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v5.0.0
|
||||||
|
|
||||||
|
- name: Prepare arm64 tag list
|
||||||
|
id: arch_tags
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "Generating arm64 tag variants (native)" >&2
|
||||||
|
TAGS='${{ needs.prepare.outputs.tags }}'
|
||||||
|
echo "$TAGS" | sed 's/$/-arm64/' | grep . > tags.txt
|
||||||
|
echo "Computed tags:" >&2; cat tags.txt >&2
|
||||||
|
echo "tags<<EOF" >> $GITHUB_OUTPUT
|
||||||
|
cat tags.txt >> $GITHUB_OUTPUT
|
||||||
|
echo "EOF" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Docker Hub login
|
||||||
|
uses: docker/login-action@v3.5.0
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3.11.1
|
||||||
|
|
||||||
|
- name: Build & push arch image (arm64 native)
|
||||||
|
id: build
|
||||||
|
uses: docker/build-push-action@v6.18.0
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
push: true
|
||||||
|
platforms: linux/arm64
|
||||||
|
tags: ${{ steps.arch_tags.outputs.tags }}
|
||||||
|
labels: ${{ needs.prepare.outputs.labels }}
|
||||||
|
build-args: |
|
||||||
|
APP_VERSION=${{ needs.prepare.outputs.version }}
|
||||||
|
|
||||||
|
build_arm64_emulated:
|
||||||
|
name: Build (arm64 emulated fallback)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [prepare, build_arm64_native]
|
||||||
|
if: needs.build_arm64_native.result == 'failure'
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v5.0.0
|
||||||
|
|
||||||
|
- name: Prepare arm64 tag list (fallback)
|
||||||
|
id: arch_tags
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "Generating arm64 tag variants (fallback)" >&2
|
||||||
|
TAGS='${{ needs.prepare.outputs.tags }}'
|
||||||
|
echo "$TAGS" | sed 's/$/-arm64/' | grep . > tags.txt
|
||||||
|
echo "tags<<EOF" >> $GITHUB_OUTPUT
|
||||||
|
cat tags.txt >> $GITHUB_OUTPUT
|
||||||
|
echo "EOF" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Docker Hub login
|
||||||
|
uses: docker/login-action@v3.5.0
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Set up QEMU (for emulation)
|
||||||
|
uses: docker/setup-qemu-action@v3.6.0
|
||||||
|
|
||||||
|
- name: Set up Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3.11.1
|
||||||
|
|
||||||
|
- name: Build & push arch image (arm64 emulated)
|
||||||
|
uses: docker/build-push-action@v6.18.0
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
push: true
|
||||||
|
platforms: linux/arm64
|
||||||
|
tags: ${{ steps.arch_tags.outputs.tags }}
|
||||||
|
labels: ${{ needs.prepare.outputs.labels }}
|
||||||
|
build-args: |
|
||||||
|
APP_VERSION=${{ needs.prepare.outputs.version }}
|
||||||
|
|
||||||
|
manifest:
|
||||||
|
name: Create multi-arch manifests
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [prepare, build_amd64, build_arm64_native, build_arm64_emulated]
|
||||||
|
steps:
|
||||||
|
- name: Docker Hub login
|
||||||
|
uses: docker/login-action@v3.5.0
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Create & push manifests
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
TAGS: ${{ needs.prepare.outputs.tags }}
|
||||||
|
run: |
|
||||||
|
echo "Creating multi-arch manifests (native preferred, fallback if needed)..."
|
||||||
|
echo "$TAGS" | while read -r tag; do
|
||||||
|
[ -z "$tag" ] && continue
|
||||||
|
echo "Processing $tag"
|
||||||
|
SOURCES="${tag}-amd64"
|
||||||
|
if docker buildx imagetools inspect "${tag}-arm64" >/dev/null 2>&1; then
|
||||||
|
echo "Found arm64 image tag: ${tag}-arm64"
|
||||||
|
SOURCES="$SOURCES ${tag}-arm64"
|
||||||
|
else
|
||||||
|
echo "No arm64 image found for $tag (skipping arm64 in manifest)" >&2
|
||||||
|
fi
|
||||||
|
docker buildx imagetools create -t "$tag" $SOURCES
|
||||||
|
done
|
||||||
|
echo "Done."
|
||||||
|
|
||||||
|
- name: Inspect primary tag
|
||||||
|
run: |
|
||||||
|
FIRST=$(echo "$TAGS" | head -n1)
|
||||||
|
docker buildx imagetools inspect "$FIRST"
|
||||||
|
|
||||||
|
|
|
||||||
84
.github/workflows/github-release.yml
vendored
84
.github/workflows/github-release.yml
vendored
|
|
@ -7,45 +7,49 @@ on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-windows:
|
# Windows executable build temporarily disabled. To re-enable:
|
||||||
name: Build Windows EXE
|
# 1. Uncomment the 'build-windows' job below.
|
||||||
runs-on: windows-latest
|
# 2. Add 'needs: build-windows' back to the 'release' job.
|
||||||
steps:
|
# 3. Re-add the artifact download & file attachment steps.
|
||||||
- name: Checkout
|
# Reason: Current releases do not ship a Windows EXE; focusing on container / source distribution.
|
||||||
uses: actions/checkout@v5.0.0
|
#
|
||||||
|
# build-windows:
|
||||||
- name: Setup Python
|
# name: Build Windows EXE
|
||||||
uses: actions/setup-python@v5.6.0
|
# runs-on: windows-latest
|
||||||
with:
|
# steps:
|
||||||
python-version: '3.11'
|
# - name: Checkout
|
||||||
|
# uses: actions/checkout@v5.0.0
|
||||||
- name: Install dependencies
|
#
|
||||||
shell: powershell
|
# - name: Setup Python
|
||||||
run: |
|
# uses: actions/setup-python@v5.6.0
|
||||||
python -m pip install --upgrade pip wheel setuptools
|
# with:
|
||||||
if (Test-Path 'requirements.txt') { pip install -r requirements.txt }
|
# python-version: '3.11'
|
||||||
pip install pyinstaller
|
#
|
||||||
|
# - name: Install dependencies
|
||||||
- name: Build executable (PyInstaller)
|
# shell: powershell
|
||||||
shell: powershell
|
# run: |
|
||||||
run: |
|
# python -m pip install --upgrade pip wheel setuptools
|
||||||
# Build using spec for reliable packaging
|
# if (Test-Path 'requirements.txt') { pip install -r requirements.txt }
|
||||||
pyinstaller mtg_deckbuilder.spec
|
# pip install pyinstaller
|
||||||
if (!(Test-Path dist/mtg-deckbuilder.exe)) {
|
#
|
||||||
Write-Host 'Spec build failed; retrying simple build with --paths code'
|
# - name: Build executable (PyInstaller)
|
||||||
pyinstaller --onefile --name mtg-deckbuilder --paths code code/main.py
|
# shell: powershell
|
||||||
}
|
# run: |
|
||||||
if (!(Test-Path dist/mtg-deckbuilder.exe)) { throw 'Build failed: dist/mtg-deckbuilder.exe not found' }
|
# pyinstaller mtg_deckbuilder.spec
|
||||||
|
# if (!(Test-Path dist/mtg-deckbuilder.exe)) {
|
||||||
- name: Upload artifact (Windows EXE)
|
# Write-Host 'Spec build failed; retrying simple build with --paths code'
|
||||||
uses: actions/upload-artifact@v4.6.2
|
# pyinstaller --onefile --name mtg-deckbuilder --paths code code/main.py
|
||||||
with:
|
# }
|
||||||
name: mtg-deckbuilder-windows
|
# if (!(Test-Path dist/mtg-deckbuilder.exe)) { throw 'Build failed: dist/mtg-deckbuilder.exe not found' }
|
||||||
path: dist/mtg-deckbuilder.exe
|
#
|
||||||
|
# - name: Upload artifact (Windows EXE)
|
||||||
|
# uses: actions/upload-artifact@v4.6.2
|
||||||
|
# with:
|
||||||
|
# name: mtg-deckbuilder-windows
|
||||||
|
# path: dist/mtg-deckbuilder.exe
|
||||||
|
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build-windows
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -69,19 +73,11 @@ jobs:
|
||||||
echo "version=$VERSION_REF" >> $GITHUB_OUTPUT
|
echo "version=$VERSION_REF" >> $GITHUB_OUTPUT
|
||||||
echo "notes_file=RELEASE_NOTES.md" >> $GITHUB_OUTPUT
|
echo "notes_file=RELEASE_NOTES.md" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Download build artifacts
|
|
||||||
uses: actions/download-artifact@v5.0.0
|
|
||||||
with:
|
|
||||||
name: mtg-deckbuilder-windows
|
|
||||||
path: artifacts
|
|
||||||
|
|
||||||
- name: Create GitHub Release
|
- name: Create GitHub Release
|
||||||
uses: softprops/action-gh-release@v2.3.2
|
uses: softprops/action-gh-release@v2.3.2
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ steps.notes.outputs.version }}
|
tag_name: ${{ steps.notes.outputs.version }}
|
||||||
name: ${{ steps.notes.outputs.version }}
|
name: ${{ steps.notes.outputs.version }}
|
||||||
body_path: ${{ steps.notes.outputs.notes_file }}
|
body_path: ${{ steps.notes.outputs.notes_file }}
|
||||||
files: |
|
|
||||||
artifacts/mtg-deckbuilder.exe
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
|
||||||
11
CHANGELOG.md
11
CHANGELOG.md
|
|
@ -12,6 +12,17 @@ This format follows Keep a Changelog principles and aims for Semantic Versioning
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- (placeholder)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- (placeholder)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- (placeholder)
|
||||||
|
|
||||||
|
## [2.2.7] - 2025-09-10
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- Comprehensive structured logging for include/exclude operations with event tracking
|
- Comprehensive structured logging for include/exclude operations with event tracking
|
||||||
- Include/exclude card lists feature with `ALLOW_MUST_HAVES=true` environment variable flag
|
- Include/exclude card lists feature with `ALLOW_MUST_HAVES=true` environment variable flag
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ services:
|
||||||
|
|
||||||
# Compliance/exports
|
# Compliance/exports
|
||||||
WEB_AUTO_ENFORCE: "0" # 1=auto-apply bracket enforcement and re-export
|
WEB_AUTO_ENFORCE: "0" # 1=auto-apply bracket enforcement and re-export
|
||||||
APP_VERSION: "v2.2.6" # Optional label shown in footer
|
APP_VERSION: "v2.2.7" # Optional label shown in footer
|
||||||
# WEB_CUSTOM_EXPORT_BASE: "" # Optional custom export basename
|
# WEB_CUSTOM_EXPORT_BASE: "" # Optional custom export basename
|
||||||
|
|
||||||
# Paths (optional overrides)
|
# Paths (optional overrides)
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ services:
|
||||||
|
|
||||||
# Compliance/exports
|
# Compliance/exports
|
||||||
WEB_AUTO_ENFORCE: "0"
|
WEB_AUTO_ENFORCE: "0"
|
||||||
APP_VERSION: "v2.2.6"
|
APP_VERSION: "v2.2.7"
|
||||||
# WEB_CUSTOM_EXPORT_BASE: ""
|
# WEB_CUSTOM_EXPORT_BASE: ""
|
||||||
|
|
||||||
# Paths (optional overrides)
|
# Paths (optional overrides)
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "mtg-deckbuilder"
|
name = "mtg-deckbuilder"
|
||||||
version = "2.2.6"
|
version = "2.2.7"
|
||||||
description = "A command-line tool for building and analyzing Magic: The Gathering decks"
|
description = "A command-line tool for building and analyzing Magic: The Gathering decks"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = {file = "LICENSE"}
|
license = {file = "LICENSE"}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue