release unstables
Some checks failed
Dotnet build and test / build (pull_request) Successful in 7m37s
Forgejo Release / release (push) Failing after 15s

This commit is contained in:
Paul Schneider 2026-08-21 22:51:25 +01:00
commit cec482625d
Signed by: notazof
GPG key ID: 1DD5D838E5343B06

View file

@ -42,11 +42,6 @@ on:
description: 'Tag à publier (requis en dispatch, ex. 1.0.6 ou 1.0.7-rc1).' description: 'Tag à publier (requis en dispatch, ex. 1.0.6 ou 1.0.7-rc1).'
required: true required: true
type: string 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: false
permissions: permissions:
contents: write contents: write
@ -62,7 +57,6 @@ jobs:
# En push tag : github.ref_name est le tag. # En push tag : github.ref_name est le tag.
# En workflow_dispatch : on lit l'input 'tag'. # En workflow_dispatch : on lit l'input 'tag'.
TAG: ${{ github.event_name == 'push' && github.ref_name || inputs.tag }} TAG: ${{ github.event_name == 'push' && github.ref_name || inputs.tag }}
FORCE_UNSTABLE: ${{ inputs.force_unstable || 'false' }}
run: | run: |
if [[ -z "$TAG" ]]; then if [[ -z "$TAG" ]]; then
echo "::error::No tag provided. In workflow_dispatch, set the 'tag' input." echo "::error::No tag provided. In workflow_dispatch, set the 'tag' input."
@ -115,12 +109,17 @@ jobs:
echo "Tag $TAG classifié comme channel=$CHANNEL" echo "Tag $TAG classifié comme channel=$CHANNEL"
# Fail-fast sur instable sauf opt-in explicite. # Seuls les suffixes explicitement autorisés déclenchent un
if [[ "$CHANNEL" == "unstable" && "${FORCE_UNSTABLE:-false}" != "true" ]]; then # release : -rcN et -betaN. Les autres suffixes (-alpha*,
echo "::error::Tag '$TAG' is unstable (suffix '$SUFFIX'). Refusing to publish." # -dev*, -preview*, etc.) restent refusés — ils sont
echo "Set force_unstable=true via workflow_dispatch to override." # utilisables localement pour itérer, mais ne doivent pas
# être publiés comme release publique.
if [[ "$CHANNEL" == "unstable" ]]; then
if [[ ! "$SUFFIX" =~ ^-(rc|beta)([0-9]+)?$ ]]; then
echo "::error::Tag '$TAG' has suffix '$SUFFIX' which is not in the allowed release suffixes (-rcN, -betaN). Refusing to publish."
exit 1 exit 1
fi fi
fi
# Lecture du CHANGELOG.md (doit exister à la racine du repo). # Lecture du CHANGELOG.md (doit exister à la racine du repo).
if [[ ! -f CHANGELOG.md ]]; then if [[ ! -f CHANGELOG.md ]]; then