OSDN Git Service

Release workflow: create source archive in the presence of hengband-en.spec
[hengbandforosx/hengbandosx.git] / .github / workflows / release.yaml
index 2f9268e..253cfc5 100644 (file)
@@ -78,7 +78,7 @@ jobs:
           extra=`sed -E -n -e 's/^[[:blank:]]*#define[[:blank:]]+H_VER_EXTRA[[:blank:]]+//p' "$verfile" | cut -d ' ' -f 1 | cut -f 1 | cut -d '/' -f 1`
           version="$major"."$minor"."$patch"
           tag=vauto"$version"
-          vertype=`sed -E -n -e 's/^[[:blank:]]*constexpr[[:blank:]]+VersionStatusType[[:blank:]]+VERSION_STATUS[[:blank:]]+=[[:blank:]]+VersionStatusType:://p' "$verfile" | cut -d ' ' -f 1 | cut -d ';' -f 1`
+          vertype=`sed -E -n -e 's/^[[:blank:]]*constexpr[[:blank:]]+VersionStatusType[[:blank:]]+VERSION_STATUS[[:blank:]]*=[[:blank:]]*VersionStatusType:://p' "$verfile" | cut -d ' ' -f 1 | cut -d ';' -f 1`
           if test x${vertype} == xALPHA ; then
             version="${version}-Alpha${extra}"
             tag="${tag}-alpha${extra}"
@@ -163,7 +163,10 @@ jobs:
           ./bootstrap
           ./configure --disable-japanese --disable-net
           make distdir
-          mv "${{ steps.store_config.outputs.name }}"-* "$out"
+          n_name=`find . -maxdepth 1 -type d -name "${{ steps.store.config.outputs.name }}"'-*' -print | wc -l`
+          name=`find . -maxdepth 1 -type d -name "${{ steps.store.config.outputs.name }}"'-*' -print`
+          test x"$n_name" != x1 || exit 1
+          test x"$name" == x"$out" || mv "$name" "$out"
           tar -cBf - "$out" | gzip -c - >"$out".tar.gz
 
       - name: Create Artifact with Source Archive Path