Skip to content

Commit

Permalink
Replace also in description text.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paebbels committed Dec 2, 2024
1 parent 7733e89 commit 50d32d1
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 9 deletions.
38 changes: 35 additions & 3 deletions .github/workflows/NightlyRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 <<EOF >> __NoTeS__.md
--------
Expand Down Expand Up @@ -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
12 changes: 6 additions & 6 deletions .github/workflows/_Checking_Nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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%
Expand Down

0 comments on commit 50d32d1

Please sign in to comment.