more logical naming of Windows artifact

And make sure the latest tag ends up on the right sha.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2023-12-07 02:38:00 -08:00
parent 2d63591ab8
commit c0c361f40f
2 changed files with 12 additions and 4 deletions

View file

@ -20,11 +20,13 @@ bash -ex ../subsurface/packaging/windows/mxe-based-build.sh installer
# the strange two step move is in order to get predictable names to use # the strange two step move is in order to get predictable names to use
# in the publish step of the GitHub Action # in the publish step of the GitHub Action
mv subsurface/subsurface.exe* ${GITHUB_WORKSPACE}/ mv subsurface/subsurface.exe* ${GITHUB_WORKSPACE}/
mv subsurface/subsurface-*.exe ${GITHUB_WORKSPACE}/subsurface-installer.exe fullname=$(cd subsurface ; ls subsurface-*.exe)
mv subsurface/"$fullname" ${GITHUB_WORKSPACE}/"${fullname%.exe}-installer.exe"
bash -ex ../subsurface/packaging/windows/smtk2ssrf-mxe-build.sh -a -i bash -ex ../subsurface/packaging/windows/smtk2ssrf-mxe-build.sh -a -i
# the strange two step move is in order to get predictable names to use # the strange two step move is in order to get predictable names to use
# in the publish step of the GitHub Action # in the publish step of the GitHub Action
mv smtk-import/smtk2ssrf.exe ${GITHUB_WORKSPACE}/ mv smtk-import/smtk2ssrf.exe ${GITHUB_WORKSPACE}/
mv smtk-import/smtk2ssrf*.exe ${GITHUB_WORKSPACE}/smtk2ssrf-installer.exe fullname=$(cd smtk-import ; ls smtk2ssrf*.exe)
mv smtk-import/smtk2ssrf*.exe ${GITHUB_WORKSPACE}/"${fullname%.exe}-installer.exe"

View file

@ -23,12 +23,18 @@ jobs:
run: | run: |
export tag="" export tag=""
export is_latest=false export is_latest=false
if [ "${{ github.ref_type }}" = "tag" ] ; then tag="${{ github.ref_name }}" ; else tag="latest"; is_latest=true ; fi if [ "${{ github.ref_type }}" = "tag" ]
then
tag="${{ github.ref_name }}"
else
tag="latest"
is_latest=true
fi
echo "tag=${tag}" >> $GITHUB_OUTPUT echo "tag=${tag}" >> $GITHUB_OUTPUT
echo "is_latest=${is_latest}" >> $GITHUB_OUTPUT echo "is_latest=${is_latest}" >> $GITHUB_OUTPUT
- name: tag current version as latest if we don't have a tag - name: tag current version as latest if we don't have a tag
if: ${{ steps.tag.outputs.is_latest == true }} if: ${{ steps.tag.outputs.is_latest == 'true' }}
uses: rickstaa/action-create-tag@v1 uses: rickstaa/action-create-tag@v1
with: with:
tag: "latest" tag: "latest"