diff --git a/.github/workflows/NightlyRelease.yml b/.github/workflows/NightlyRelease.yml index 74296ae..7d90876 100644 --- a/.github/workflows/NightlyRelease.yml +++ b/.github/workflows/NightlyRelease.yml @@ -124,9 +124,7 @@ jobs: export GH_TOKEN=${{ github.token }} - if ${{ inputs.draft }}; then - addDraft="--draft" - fi + addDraft="--draft" if ${{ inputs.prerelease }}; then addPreRelease="--prerelease" @@ -146,6 +144,18 @@ jobs: if [[ -s __NoTeS__.md ]]; then addNotes=("--notes-file" "__NoTeS__.md") fi + + # Apply replacements + while IFS=$'\r\n' read -r patternLine; do + # skipp empty lines + [[ "$patternLine" == "" ]] && continue + + pattern="${patternLine%%=*}" + replacement="${patternLine#*=}" + sed -i -e "s/%$pattern%/$replacement/g" "__NoTeS__.md" + done <<<'${{ inputs.replacements }}' + + # Add footer line cat <> __NoTeS__.md -------- @@ -353,3 +363,25 @@ jobs: echo -e "${ANSI_LIGHT_RED}Errors detected in previous steps.${ANSI_NOCOLOR}" exit 1 fi + + - name: 📑 Remove draft state from Release Page + if: ${{ ! inputs.draft }} + run: | + set +e + + ANSI_LIGHT_RED="\e[91m" + ANSI_LIGHT_GREEN="\e[92m" + ANSI_NOCOLOR="\e[0m" + + export GH_TOKEN=${{ github.token }} + + # Remove draft-state from release page + echo -n "Remove draft-state from release '${title}' ... " + gh release edit --draft=false "${{ inputs.nightly_name }}" + if [[ $? -eq 0 ]]; then + echo -e "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}" + else + echo -e "${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}" + echo -e "${ANSI_LIGHT_RED}Couldn't remove draft-state from release '${{ inputs.nightly_name }}'.${ANSI_NOCOLOR}" + echo "::error title=ReleasePage::Couldn't remove draft-state from release '${{ inputs.nightly_name }}'." + fi diff --git a/.github/workflows/_Checking_Nightly.yml b/.github/workflows/_Checking_Nightly.yml index 8862278..cfb4b45 100644 --- a/.github/workflows/_Checking_Nightly.yml +++ b/.github/workflows/_Checking_Nightly.yml @@ -52,11 +52,15 @@ jobs: # attestations: write with: prerelease: true + replacements: | + version=4.2.0 + tool=myTool + prog=program nightly_title: "Nightly Release" nightly_description: | This *nightly* release contains all latest and important artifacts created by GHDL's CI pipeline. - # GHDL 5.0.0-dev + # GHDL %version% GHDL offers the simulator and synthesis tool for VHDL. GHDL can be build for various backends: * `gcc` - using the GCC compiler framework @@ -71,7 +75,7 @@ jobs: * Windows builds for standalone usage (without MSYS2) as ZIP file * MSYS2 packages as TAR/ZST file - # pyGHDL 5.0.0-dev + # pyGHDL %version% The Python package `pyGHDL` offers Python binding (`pyGHDL.libghdl`) to a `libghdl` shared library (`*.so`/`*.dll`). In addition to the low-level binding layer, pyGHDL offers: @@ -81,10 +85,6 @@ jobs: The following asset categories are provided for pyGHDL: * Platform specific Python wheel package for Ubuntu incl. `pyGHDL...so` * Platform specific Python wheel package for Windows incl. `pyGHDL...dll` - replacements: | - version=2.0 - tool=myTool - prog=program assets: | document: document1.txt: Documentation document: build.log: Logfile - %tool% - %tool%