Переглянути джерело

Merge pull request #2 from coredao-org/feature/workflow

Feature/workflow
CharlesWood 2 роки тому
батько
коміт
42903232fd
2 змінених файлів з 9 додано та 34 видалено
  1. 2 3
      .github/generate_change_log.sh
  2. 7 31
      .github/workflows/release.yml

+ 2 - 3
.github/generate_change_log.sh

@@ -19,21 +19,20 @@ while read line; do
         CHANGE_LOG+="$line\n"
     fi
 done < ${change_log_file}
-#MAINNET_ZIP_SUM="$(checksum ./mainnet.zip)"
+MAINNET_ZIP_SUM="$(checksum ./mainnet.zip)"
 TESTNET_ZIP_SUM="$(checksum ./testnet.zip)"
 LINUX_BIN_SUM="$(checksum ./linux/geth)"
 MAC_BIN_SUM="$(checksum ./macos/geth)"
-WINDOWS_BIN_SUM="$(checksum ./windows/geth.exe)"
 OUTPUT=$(cat <<-END
 ## Changelog\n
 ${CHANGE_LOG}\n
 ## Assets\n
 |    Assets    | Sha256 Checksum  |\n
 | :-----------: |------------|\n
+| mainnet.zip | ${MAINNET_ZIP_SUM} |\n
 | testnet.zip | ${TESTNET_ZIP_SUM} |\n
 | geth_linux | ${LINUX_BIN_SUM} |\n
 | geth_mac  | ${MAC_BIN_SUM} |\n
-| geth_windows  | ${WINDOWS_BIN_SUM} |\n
 END
 )
 

+ 7 - 31
.github/workflows/release.yml

@@ -14,7 +14,7 @@ jobs:
     strategy:
       matrix:
         go-version: [1.17.x]
-        os: [ubuntu-18.04, macos-11, windows-2019]
+        os: [ubuntu-18.04, macos-11]
     runs-on: ${{ matrix.os }}
     steps:
       - name: Checkout Code
@@ -31,7 +31,6 @@ jobs:
           # * Module download cache
           # * Build cache (Linux)
           # * Build cache (Mac)
-          # * Build cache (Windows)
           path: |
             ~/go/pkg/mod
             ~/.cache/go-build
@@ -42,7 +41,7 @@ jobs:
             ${{ runner.os }}-go-
 
       # ==============================
-      #       Linux/Macos/Windows Build
+      #       Linux/Macos Build
       # ==============================
 
       - name: Build Binary for ${{matrix.os}}
@@ -66,13 +65,6 @@ jobs:
           name: macos
           path: ./build/bin/geth
 
-      - name: Upload Windows Build
-        uses: actions/upload-artifact@v2
-        if: matrix.os == 'windows-2019'
-        with:
-          name: windows
-          path: ./build/bin/geth.exe
-
   release:
     name: Release
     needs: build
@@ -100,19 +92,13 @@ jobs:
           name: macos
           path: ./macos
 
-      - name: Download Artifacts
-        uses: actions/download-artifact@v2
-        with:
-          name: windows
-          path: ./windows
-
       - name: Download Config File
         run: |
           . ./.github/release.env
           echo "mainnet.zip url: $MAINNET_FILE_URL"
           echo "testnet.zip url: $TESTNET_FILE_URL"
+          curl -L $MAINNET_FILE_URL -o ./mainnet.zip
           curl -L $TESTNET_FILE_URL -o ./testnet.zip
-#          curl -L $MAINNET_FILE_URL -o ./mainnet.zip
 
       # ==============================
       #       Create release
@@ -163,25 +149,15 @@ jobs:
           asset_name: geth_mac
           asset_content_type: application/octet-stream
 
-      - name: Upload Release Asset - Windows
+      - name: Upload Release Asset - MAINNET.ZIP
         uses: actions/upload-release-asset@v1
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         with:
           upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
-          asset_path: ./windows/geth.exe
-          asset_name: geth_windows.exe
-          asset_content_type: application/octet-stream
-
-#      - name: Upload Release Asset - MAINNET.ZIP
-#        uses: actions/upload-release-asset@v1
-#        env:
-#          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-#        with:
-#          upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
-#          asset_path: ./mainnet.zip
-#          asset_name: mainnet.zip
-#          asset_content_type: application/zip
+          asset_path: ./mainnet.zip
+          asset_name: mainnet.zip
+          asset_content_type: application/zip
 
       - name: Upload Release Asset - TESTNET.ZIP
         uses: actions/upload-release-asset@v1