From 051c9d6f9698eac7cd9b8de3720c94a96947272b Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 10 Oct 2026 05:00:42 +0000 Subject: [PATCH] =?UTF-8?q?ci:=20cr=C3=A9er=20une=20release=20depuis=20l'o?= =?UTF-8?q?nglet=20Actions,=20sans=20terminal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Le lancement manuel du workflow PDF accepte un champ tag : la CI génère les PDF puis crée le tag et la release sur ce commit (gh release create --target). Le déclenchement par push de tag v* reste inchangé. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01JwMs9domctSBJ4Va2xUsyQ --- .github/workflows/pdf.yml | 30 +++++++++++++++++++++++------- CLAUDE.md | 2 ++ 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pdf.yml b/.github/workflows/pdf.yml index 08cda2b..3366ec0 100644 --- a/.github/workflows/pdf.yml +++ b/.github/workflows/pdf.yml @@ -6,7 +6,14 @@ on: branches: [master] tags: ["v*"] pull_request: + # Lancement manuel (onglet Actions, « Run workflow ») : avec un tag, + # crée aussi le tag et la release sur le commit choisi, sans terminal. workflow_dispatch: + inputs: + tag: + description: "Tag de la release à créer (ex. v2026.3), vide pour les PDF seuls" + required: false + default: "" permissions: contents: read @@ -43,7 +50,9 @@ jobs: release: needs: pdf - if: startsWith(github.ref, 'refs/tags/v') + if: >- + startsWith(github.ref, 'refs/tags/v') + || (github.event_name == 'workflow_dispatch' && inputs.tag != '') runs-on: ubuntu-24.04 permissions: contents: write @@ -56,10 +65,17 @@ jobs: - name: Créer la release env: GH_TOKEN: ${{ github.token }} - TAG: ${{ github.ref_name }} + TAG: ${{ inputs.tag || github.ref_name }} REPO: ${{ github.repository }} - run: > - gh release create "$TAG" pdf/*.pdf - --repo "$REPO" - --title "Formation Linux $TAG" - --generate-notes + # --target : en lancement manuel, le tag n'existe pas encore ; + # gh le crée sur le commit qui a produit les PDF. + run: | + case "$TAG" in + v*) ;; + *) echo "Tag invalide : $TAG (doit commencer par v)"; exit 1 ;; + esac + gh release create "$TAG" pdf/*.pdf \ + --repo "$REPO" \ + --target "$GITHUB_SHA" \ + --title "Formation Linux $TAG" \ + --generate-notes diff --git a/CLAUDE.md b/CLAUDE.md index b094a00..e718108 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -272,4 +272,6 @@ Chaque concept n'est enseigné que dans UN chapitre. Dans les autres chapitres, git tag v2026.1 && git push origin v2026.1 ``` + Sans terminal : onglet **Actions** du dépôt, workflow **PDF**, **Run workflow** sur `master`, en indiquant le tag (ex. `v2026.3`) : la CI crée le tag et la release. + - La mise en page riche (cadre de couleur, numérotation romaine des pages liminaires, recto-verso) est une évolution possible, pas l'état actuel.