<div dir="ltr"><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"></blockquote>Thank you for the review, Gao Xiang.<br><br>I have updated the patch addressing all your feedback:<br><br>1. Added "erofs-utils:" prefix to subject<br>2. Extract release notes from ChangeLog file<br>3. Build static Linux binaries using Alpine/musl<br><br>---<br> .github/workflows/release.yml | 121 +++++++++++++++++++++<br> 1 file changed, 121 insertions(+)<br><br>diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml<br>new file mode 100644<br>--- /dev/null<br>+++ b/.github/workflows/release.yml<br>@@ -0,0 +1,121 @@<br><div style="color:rgb(228,228,228);background-color:rgb(24,24,24);font-family:Consolas,"Courier New",monospace;font-size:14px;line-height:19px;white-space:pre"><div><span style="color:rgb(227,148,220)">name</span>: <span style="color:rgb(227,148,220)">Release</span></div><br><div><span style="color:rgb(227,148,220)">on</span>:</div><div>  <span style="color:rgb(227,148,220)">push</span>:</div><div>    <span style="color:rgb(227,148,220)">tags</span>:</div><div>      <span style="color:rgb(214,214,221)">-</span> <span style="color:rgb(227,148,220)">"*"</span></div><br><div><span style="color:rgb(227,148,220)">permissions</span>:</div><div>  <span style="color:rgb(227,148,220)">contents</span>: <span style="color:rgb(227,148,220)">write</span></div><br><div><span style="color:rgb(227,148,220)">jobs</span>:</div><div>  <span style="color:rgb(227,148,220)">build-static-linux-musl</span>:</div><div>    <span style="color:rgb(227,148,220)">name</span>: <span style="color:rgb(227,148,220)">Build static Linux binaries (musl)</span></div><div>    <span style="color:rgb(227,148,220)">runs-on</span>: <span style="color:rgb(227,148,220)">ubuntu-latest</span></div><div>    <span style="color:rgb(227,148,220)">container</span>:</div><div>      <span style="color:rgb(227,148,220)">image</span>: <span style="color:rgb(227,148,220)">alpine:3.20</span></div><br><div>    <span style="color:rgb(227,148,220)">steps</span>:</div><div>      <span style="color:rgb(214,214,221)">-</span> <span style="color:rgb(227,148,220)">name</span>: <span style="color:rgb(227,148,220)">Checkout source</span></div><div>        <span style="color:rgb(227,148,220)">uses</span>: <span style="color:rgb(227,148,220)">actions/checkout@v4</span></div><br><div>      <span style="color:rgb(214,214,221)">-</span> <span style="color:rgb(227,148,220)">name</span>: <span style="color:rgb(227,148,220)">Install build dependencies</span></div><div>        <span style="color:rgb(227,148,220)">run</span>: <span style="color:rgb(130,210,206)">|</span></div><div>          <span style="color:rgb(227,148,220)">apk add --no-cache \</span></div><div>        <span style="color:rgb(227,148,220)">    bash \</span></div><div>        <span style="color:rgb(227,148,220)">    build-base \</span></div><div>        <span style="color:rgb(227,148,220)">    autoconf \</span></div><div>        <span style="color:rgb(227,148,220)">    automake \</span></div><div>        <span style="color:rgb(227,148,220)">    libtool \</span></div><div>        <span style="color:rgb(227,148,220)">    lz4-dev \</span></div><div>        <span style="color:rgb(227,148,220)">    zlib-dev \</span></div><div>        <span style="color:rgb(227,148,220)">    fuse-dev \</span></div><div>        <span style="color:rgb(227,148,220)">    musl-dev \</span></div><div>        <span style="color:rgb(227,148,220)">    tar \</span></div><div>        <span style="color:rgb(227,148,220)">    gzip</span></div><br><div>      <span style="color:rgb(214,214,221)">-</span> <span style="color:rgb(227,148,220)">name</span>: <span style="color:rgb(227,148,220)">Configure and build</span></div><div>        <span style="color:rgb(227,148,220)">run</span>: <span style="color:rgb(130,210,206)">|</span></div><div>          <span style="color:rgb(227,148,220)">./autogen.sh</span></div><div>        <span style="color:rgb(227,148,220)">  ./configure --enable-static</span></div><div>        <span style="color:rgb(227,148,220)">  make -j"$(getconf _NPROCESSORS_ONLN || echo 2)"</span></div><br><div>      <span style="color:rgb(214,214,221)">-</span> <span style="color:rgb(227,148,220)">name</span>: <span style="color:rgb(227,148,220)">Create release archive</span></div><div>        <span style="color:rgb(227,148,220)">env</span>:</div><div>          <span style="color:rgb(227,148,220)">TAG_NAME</span>: <span style="color:rgb(227,148,220)">${{ github.ref_name }}</span></div><div>        <span style="color:rgb(227,148,220)">run</span>: <span style="color:rgb(130,210,206)">|</span></div><div>          <span style="color:rgb(227,148,220)">set -e</span></div><div>        <span style="color:rgb(227,148,220)">  archive="erofs-utils-${TAG_NAME}-linux-musl-static.tar.gz"</span></div><div>        <span style="color:rgb(227,148,220)">  mkdir -p dist/bin</span></div><div>        <span style="color:rgb(227,148,220)">  for bin in \</span></div><div>        <span style="color:rgb(227,148,220)">    mkfs/mkfs.erofs \</span></div><div>        <span style="color:rgb(227,148,220)">    fsck/fsck.erofs \</span></div><div>        <span style="color:rgb(227,148,220)">    dump/dump.erofs \</span></div><div>        <span style="color:rgb(227,148,220)">    fuse/erofsfuse \</span></div><div>        <span style="color:rgb(227,148,220)">    mount/mount.erofs; do</span></div><div>        <span style="color:rgb(227,148,220)">    if [ -x "$bin" ]; then</span></div><div>        <span style="color:rgb(227,148,220)">      install -m 0755 "$bin" dist/bin/</span></div><div>        <span style="color:rgb(227,148,220)">    fi</span></div><div>        <span style="color:rgb(227,148,220)">  done</span></div><div>        <span style="color:rgb(227,148,220)">  tar -C dist -czf "$archive" .</span></div><div>        <span style="color:rgb(227,148,220)">  echo "archive=$archive" >> "$GITHUB_OUTPUT"</span></div><div>        <span style="color:rgb(227,148,220)">id</span>: <span style="color:rgb(227,148,220)">package</span></div><br><div>      <span style="color:rgb(214,214,221)">-</span> <span style="color:rgb(227,148,220)">name</span>: <span style="color:rgb(227,148,220)">Upload build artifact</span></div><div>        <span style="color:rgb(227,148,220)">uses</span>: <span style="color:rgb(227,148,220)">actions/upload-artifact@v4</span></div><div>        <span style="color:rgb(227,148,220)">with</span>:</div><div>          <span style="color:rgb(227,148,220)">name</span>: <span style="color:rgb(227,148,220)">static-linux-musl</span></div><div>          <span style="color:rgb(227,148,220)">path</span>: <span style="color:rgb(227,148,220)">${{ steps.package.outputs.archive }}</span></div><br><div>  <span style="color:rgb(227,148,220)">release</span>:</div><div>    <span style="color:rgb(227,148,220)">name</span>: <span style="color:rgb(227,148,220)">Publish release</span></div><div>    <span style="color:rgb(227,148,220)">runs-on</span>: <span style="color:rgb(227,148,220)">ubuntu-latest</span></div><div>    <span style="color:rgb(227,148,220)">needs</span>: <span style="color:rgb(227,148,220)">build-static-linux-musl</span></div><br><div>    <span style="color:rgb(227,148,220)">steps</span>:</div><div>      <span style="color:rgb(214,214,221)">-</span> <span style="color:rgb(227,148,220)">name</span>: <span style="color:rgb(227,148,220)">Checkout source</span></div><div>        <span style="color:rgb(227,148,220)">uses</span>: <span style="color:rgb(227,148,220)">actions/checkout@v4</span></div><br><div>      <span style="color:rgb(214,214,221)">-</span> <span style="color:rgb(227,148,220)">name</span>: <span style="color:rgb(227,148,220)">Download build artifact</span></div><div>        <span style="color:rgb(227,148,220)">uses</span>: <span style="color:rgb(227,148,220)">actions/download-artifact@v4</span></div><div>        <span style="color:rgb(227,148,220)">with</span>:</div><div>          <span style="color:rgb(227,148,220)">name</span>: <span style="color:rgb(227,148,220)">static-linux-musl</span></div><div>          <span style="color:rgb(227,148,220)">path</span>: <span style="color:rgb(227,148,220)">.</span></div><br><div>      <span style="color:rgb(214,214,221)">-</span> <span style="color:rgb(227,148,220)">name</span>: <span style="color:rgb(227,148,220)">Extract release notes from ChangeLog</span></div><div>        <span style="color:rgb(227,148,220)">id</span>: <span style="color:rgb(227,148,220)">changelog</span></div><div>        <span style="color:rgb(227,148,220)">shell</span>: <span style="color:rgb(227,148,220)">bash</span></div><div>        <span style="color:rgb(227,148,220)">run</span>: <span style="color:rgb(130,210,206)">|</span></div><div>          <span style="color:rgb(227,148,220)">tag_version="${GITHUB_REF_NAME#v}"</span></div><div>        <span style="color:rgb(227,148,220)">  notes_file="$(mktemp)"</span></div><br><div>        <span style="color:rgb(227,148,220)">  awk -v ver="$tag_version" '</span></div><div>        <span style="color:rgb(227,148,220)">    $0 ~ "^erofs-utils " {</span></div><div>        <span style="color:rgb(227,148,220)">      if (capture) exit</span></div><div>        <span style="color:rgb(227,148,220)">      if ($0 ~ "^erofs-utils " ver "([[:space:]]|$|\\()") {</span></div><div>        <span style="color:rgb(227,148,220)">        capture=1</span></div><div>        <span style="color:rgb(227,148,220)">        next</span></div><div>        <span style="color:rgb(227,148,220)">      }</span></div><div>        <span style="color:rgb(227,148,220)">    }</span></div><div>        <span style="color:rgb(227,148,220)">    capture && /^ -- / { exit }</span></div><div>        <span style="color:rgb(227,148,220)">    capture { print }</span></div><div>        <span style="color:rgb(227,148,220)">  ' ChangeLog > "$notes_file"</span></div><br><div>        <span style="color:rgb(227,148,220)">  sed -i '/^[[:space:]]*$/N;/^\n$/D' "$notes_file"</span></div><br><div>        <span style="color:rgb(227,148,220)">  if [ ! -s "$notes_file" ]; then</span></div><div>        <span style="color:rgb(227,148,220)">    echo "No matching changelog entry found for ${GITHUB_REF_NAME}." > "$notes_file"</span></div><div>        <span style="color:rgb(227,148,220)">  fi</span></div><br><div>        <span style="color:rgb(227,148,220)">  {</span></div><div>        <span style="color:rgb(227,148,220)">    echo "body<<EOF"</span></div><div>        <span style="color:rgb(227,148,220)">    cat "$notes_file"</span></div><div>        <span style="color:rgb(227,148,220)">    echo "EOF"</span></div><div>        <span style="color:rgb(227,148,220)">  } >> "$GITHUB_OUTPUT"</span></div><br><div>      <span style="color:rgb(214,214,221)">-</span> <span style="color:rgb(227,148,220)">name</span>: <span style="color:rgb(227,148,220)">Create GitHub release</span></div><div>        <span style="color:rgb(227,148,220)">uses</span>: <span style="color:rgb(227,148,220)">softprops/action-gh-release@v2</span></div><div>        <span style="color:rgb(227,148,220)">with</span>:</div><div>          <span style="color:rgb(227,148,220)">name</span>: <span style="color:rgb(227,148,220)">${{ github.ref_name }}</span></div><div>          <span style="color:rgb(227,148,220)">body</span>: <span style="color:rgb(227,148,220)">${{ steps.changelog.outputs.body }}</span></div><div>          <span style="color:rgb(227,148,220)">files</span>: <span style="color:rgb(227,148,220)">erofs-utils-${{ github.ref_name }}-linux-musl-static.tar.gz</span></div><br></div><br>Signed-off-by: Kamran Alam <<a href="mailto:kamrankhan0368@gmail.com">kamrankhan0368@gmail.com</a>></div></div>