Remove invalid characters in artifact names

This commit is contained in:
NielsAD
2022-03-12 10:41:28 +01:00
parent 7d064a3667
commit a453057e98

View File

@@ -36,19 +36,21 @@ jobs:
- name: Prepare artifacts
run: |
REF_NAME=$(echo "${GITHUB_HEAD_REF:-$GITHUB_REF_NAME}" | sed 's/[^a-zA-Z0-9\-_.]/-/g')
echo "ref_name=$REF_NAME" >> $GITHUB_ENV
echo -e "Author: Niels A.D.
Project: autoindex (https://github.com/nielsAD/autoindex)
Platform: `go env GOOS`/`go env GOARCH` (`go env GOVERSION`)
Release: $GITHUB_REF_NAME ($GITHUB_SHA)
Release: $REF_NAME ($GITHUB_SHA)
Date: `date --utc`" > VERSION.txt
mv autoindex.exe autoindex-$GITHUB_REF_NAME.exe || true
mv autoindex autoindex-$GITHUB_REF_NAME || true
mv autoindex.exe autoindex-$REF_NAME.exe || true
mv autoindex autoindex-$REF_NAME || true
mv LICENSE LICENSE.txt
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: autoindex_${{ github.ref_name }}_${{ runner.os }}
name: autoindex_${{ env.ref_name }}_${{ runner.os }}
path: |
autoindex-*
LICENSE.txt