Replace also in description text.

This commit is contained in:
Patrick Lehmann
2024-12-02 08:01:26 +01:00
parent 7733e8998f
commit 50d32d1950
2 changed files with 41 additions and 9 deletions

View File

@@ -124,9 +124,7 @@ jobs:
export GH_TOKEN=${{ github.token }} export GH_TOKEN=${{ github.token }}
if ${{ inputs.draft }}; then addDraft="--draft"
addDraft="--draft"
fi
if ${{ inputs.prerelease }}; then if ${{ inputs.prerelease }}; then
addPreRelease="--prerelease" addPreRelease="--prerelease"
@@ -146,6 +144,18 @@ jobs:
if [[ -s __NoTeS__.md ]]; then if [[ -s __NoTeS__.md ]]; then
addNotes=("--notes-file" "__NoTeS__.md") addNotes=("--notes-file" "__NoTeS__.md")
fi 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 <<EOF >> __NoTeS__.md cat <<EOF >> __NoTeS__.md
-------- --------
@@ -353,3 +363,25 @@ jobs:
echo -e "${ANSI_LIGHT_RED}Errors detected in previous steps.${ANSI_NOCOLOR}" echo -e "${ANSI_LIGHT_RED}Errors detected in previous steps.${ANSI_NOCOLOR}"
exit 1 exit 1
fi 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

View File

@@ -52,11 +52,15 @@ jobs:
# attestations: write # attestations: write
with: with:
prerelease: true prerelease: true
replacements: |
version=4.2.0
tool=myTool
prog=program
nightly_title: "Nightly Release" nightly_title: "Nightly Release"
nightly_description: | nightly_description: |
This *nightly* release contains all latest and important artifacts created by GHDL's CI pipeline. 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: GHDL offers the simulator and synthesis tool for VHDL. GHDL can be build for various backends:
* `gcc` - using the GCC compiler framework * `gcc` - using the GCC compiler framework
@@ -71,7 +75,7 @@ jobs:
* Windows builds for standalone usage (without MSYS2) as ZIP file * Windows builds for standalone usage (without MSYS2) as ZIP file
* MSYS2 packages as TAR/ZST 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`). 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: In addition to the low-level binding layer, pyGHDL offers:
@@ -81,10 +85,6 @@ jobs:
The following asset categories are provided for pyGHDL: The following asset categories are provided for pyGHDL:
* Platform specific Python wheel package for Ubuntu incl. `pyGHDL...so` * Platform specific Python wheel package for Ubuntu incl. `pyGHDL...so`
* Platform specific Python wheel package for Windows incl. `pyGHDL...dll` * Platform specific Python wheel package for Windows incl. `pyGHDL...dll`
replacements: |
version=2.0
tool=myTool
prog=program
assets: | assets: |
document: document1.txt: Documentation document: document1.txt: Documentation
document: build.log: Logfile - %tool% - %tool% document: build.log: Logfile - %tool% - %tool%