diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml index d312d5b..d280912 100644 --- a/.forgejo/workflows/release.yml +++ b/.forgejo/workflows/release.yml @@ -51,36 +51,12 @@ on: description: 'Publier une release avec suffixe (ex. 1.0.0-rc1) malgré le fail-fast par défaut.' required: false type: boolean - default: true - workflow_call: - inputs: - tag: - description: 'Tag pazof/yavsc à packager (requis en dispatch, ex. 1.0.6 ou 1.0.7-rc1).' - required: true - type: string - force_unstable: - description: 'Publier une release avec suffixe (ex. 1.0.0-rc1) malgré le fail-fast par défaut.' - required: false - type: boolean - default: true -env: - FORCE_UNSTABLE: ${{ inputs.force_unstable || 'false' }} - TAG: ${{ forgejo.event_name == 'push' && forgejo.ref_name || inputs.tag }} + default: false permissions: contents: write jobs: - - log_inputs: - runs-on: docker - container: - image: docker.io/pazof/yavsc-build-env:debian12-dotnet10-android36-v2 - steps: - - name: Log inputs - run: | - echo "TAG=$TAG" - echo "FORCE_UNSTABLE=$FORCE_UNSTABLE" # Job unique : validation tag/CHANGELOG + build amd64 + build # arm64 + publication via l'API REST Forgejo (pas d'actions # tierces Node). @@ -89,15 +65,46 @@ jobs: container: image: docker.io/pazof/yavsc-build-env:debian12-dotnet10-android36-v2 env: - STATE_FILE: /tmp/release-state + STATE_FILE: /tmp/release-state.json steps: + - name: Installer les pré-requis de build (debhelper + icônes) + # L'image runner fournit déjà dotnet-sdk-10.0, git, jq, + # curl. On ajoute les outils spécifiques au packaging + # Debian (debhelper, imagemagick pour les icônes .png + # via `convert`, librsvg2-bin pour le SVG). + run: | + apt-get update + # Cross-build deps for arm64: + # 1. dpkg --add-architecture arm64 + apt-get update — make + # apt aware of arm64 packages. + # 2. Install the arm64 RUNTIME libs (libc6:arm64, etc.) + # so dpkg-shlibdeps can resolve the .so dependencies + # of the arm64 binaries via the on-host shlibs cache. + # The runtime libs (not -dev:arm64) is what carries + # the SONAME metadata that dpkg-shlibdeps matches. + # 3. crossbuild-essential-arm64 pulls gcc/binutils for + # arm64, plus dpkg-cross CONFIG_SITE files under + # /etc/dpkg-cross/. The cross-gcc is unused for our + # dotnet-only build but harmless. + dpkg --add-architecture arm64 + apt-get update + apt-get install -y --no-install-recommends \ + build-essential debhelper imagemagick librsvg2-bin \ + ca-certificates crossbuild-essential-arm64 \ + libc6:arm64 libstdc++6:arm64 \ + libfontconfig1:arm64 libfreetype6:arm64 \ + libgtk-3-0:arm64 + rm -rf /var/lib/apt/lists/* + : > "$STATE_FILE" + - name: Clone du repo au tag demandé + env: + TAG: ${{ forgejo.event_name == 'push' && forgejo.ref_name || inputs.tag }} run: | if [[ -z "$TAG" ]]; then echo "::error::No tag provided. In workflow_dispatch, set the 'tag' input." exit 1 fi - echo "→ Cloning repo at tag $TAG" cd /src if [[ ! -d _src/.git ]]; then @@ -115,11 +122,11 @@ jobs: # Persist TAG in the state file. --arg ensures proper # JSON escaping of any special chars. - echo "$TAG" > "tag.txt" + jq -n --arg tag "$TAG" '{tag: $tag}' > "$STATE_FILE" - name: Valider le tag et la section CHANGELOG run: | - TAG=$(cat "tag.txt") + TAG=$(jq -r '.tag' "$STATE_FILE") cd /src/_src echo "Validating tag $TAG" diff --git a/Makefile b/Makefile index 6da7ce6..43e7fc5 100644 --- a/Makefile +++ b/Makefile @@ -22,9 +22,9 @@ # POSTIT_OUT_DIR default: $(CURDIR)/.. (artifacts land here) POSTIT_GIT_URL ?= https://github.com/pazof/yavsc.git -POSTIT_GIT_TAG ?= 1.0.8-rc15 +POSTIT_GIT_TAG ?= 1.0.6 POSTIT_RUNTIME ?= linux-x64 -POSTIT_OUT_DIR ?= $(CURDIR)/build +POSTIT_OUT_DIR ?= $(CURDIR)/.. .PHONY: deb clean source test