From eea0e89be665bc211e042e993ebc69e8d14c39d6 Mon Sep 17 00:00:00 2001
From: loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
Date: Thu, 12 Mar 2020 23:00:07 +0800
Subject: [PATCH] Generate dlc.dat sha256 hash

---
 .github/workflows/build.yml | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 6c45fcf9..8ffc7f93 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -33,6 +33,10 @@ jobs:
         run: |
           domain-list-community
 
+      - name: Generate dlc.dat sha256 hash
+        run: |
+          sha256sum dlc.dat > dlc.dat.sha256sum
+
       - name: Create a release
         id: create_release
         uses: actions/create-release@v1
@@ -44,8 +48,7 @@ jobs:
           draft: false
           prerelease: false
 
-      - name: Upload dat file
-        id: upload-release-asset 
+      - name: Upload dlc.dat
         uses: actions/upload-release-asset@v1
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -54,3 +57,13 @@ jobs:
           asset_path: ./dlc.dat
           asset_name: dlc.dat
           asset_content_type: application/octet-stream
+
+      - name: Upload dlc.dat sha256sum
+        uses: actions/upload-release-asset@v1
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        with:
+          upload_url: ${{ steps.create_release.outputs.upload_url }}
+          asset_path: ./dlc.dat.sha256sum
+          asset_name: dlc.dat.sha256sum
+          asset_content_type: text/plain