From 28b9d0b18f1cc44d2b18fb3a7005ddfa798d24f5 Mon Sep 17 00:00:00 2001 From: fumiama Date: Sat, 7 Aug 2021 01:40:06 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20=E6=9B=B4=E6=96=B0=E7=BC=96?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/latest.yml | 42 +++++++++++++++++++++++++++--- .github/workflows/release.yml | 49 ++++++++++++++++++++++++++++++++--- 2 files changed, 84 insertions(+), 7 deletions(-) diff --git a/.github/workflows/latest.yml b/.github/workflows/latest.yml index e8f8fd65..fa9334d4 100644 --- a/.github/workflows/latest.yml +++ b/.github/workflows/latest.yml @@ -34,9 +34,45 @@ jobs: - name: Build linux-x64 run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-x64 + - name: Build linux-x86 + run: CGO_ENABLED=0 GOOS=linux GOARCH=386 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-x86 + - name: Build windows-x64 + run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-windows-x64.exe + - name: Build windows-x86 + run: CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-windows-x86.exe + - name: Build arm64 + run: CGO_ENABLED=0 GOOS=linux GOARCH=arm64 GOARM=7 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-arm64 + - name: Build armv6 + run: CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build -ldflags="-s -w" -o artifacts/zerobot-plugin-linux-armv6 - - name: Upload Build Artifact + - name: Upload Build Artifact Linux x64 uses: actions/upload-artifact@v2 with: - name: zerobot-plugin - path: ./artifacts/zerobot-plugin-* \ No newline at end of file + name: zerobot-plugin-linux-x64 + path: ./artifacts/zerobot-plugin-linux-x64 + - name: Upload Build Artifact Linux x86 + uses: actions/upload-artifact@v2 + with: + name: zerobot-plugin-linux-x86 + path: ./artifacts/zerobot-plugin-linux-x86 + - name: Upload Build Artifact Windows x64 + uses: actions/upload-artifact@v2 + with: + name: zerobot-plugin-windows-x64.exe + path: ./artifacts/zerobot-plugin-windows-x64.exe + - name: Upload Build Artifact Windows x86 + uses: actions/upload-artifact@v2 + with: + name: zerobot-plugin-windows-x86.exe + path: ./artifacts/zerobot-plugin-windows-x86.exe + - name: Upload Build Artifact Linux arm64 + uses: actions/upload-artifact@v2 + with: + name: zerobot-plugin-linux-arm64 + path: ./artifacts/zerobot-plugin-linux-arm64 + - name: Upload Build Artifact Linux armv6 + uses: actions/upload-artifact@v2 + with: + name: zerobot-plugin-linux-armv6 + path: ./artifacts/zerobot-plugin-linux-armv6 + diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 97aff45e..1c038243 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,11 +54,52 @@ jobs: draft: false prerelease: false - - name: Upload Release Asset + - name: Upload Release Asset Linux x64 id: upload-release-asset uses: actions/upload-release-asset@v1 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: ./artifacts - asset_name: zerobot-plugin - asset_content_type: application/octet-stream \ No newline at end of file + asset_path: ./artifacts/zerobot-plugin-linux-x64 + asset_name: zerobot-plugin-linux-x64 + asset_content_type: application/octet-stream + - name: Upload Release Asset Linux x86 + id: upload-release-asset + uses: actions/upload-release-asset@v1 + 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: ./artifacts/zerobot-plugin-linux-x86 + asset_name: zerobot-plugin-linux-x86 + asset_content_type: application/octet-stream + - name: Upload Release Asset Windows x64 + id: upload-release-asset + uses: actions/upload-release-asset@v1 + 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: ./artifacts/zerobot-plugin-windows-x64.exe + asset_name: zerobot-plugin-windows-x64.exe + asset_content_type: application/octet-stream + - name: Upload Release Asset Windows x86 + id: upload-release-asset + uses: actions/upload-release-asset@v1 + 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: ./artifacts/zerobot-plugin-windows-x86.exe + asset_name: zerobot-plugin-windows-x86.exe + asset_content_type: application/octet-stream + - name: Upload Release Asset ARM64 + id: upload-release-asset + uses: actions/upload-release-asset@v1 + 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: ./artifacts/zerobot-plugin-linux-arm64 + asset_name: zerobot-plugin-linux-arm64 + asset_content_type: application/octet-stream + - name: Upload Release Asset ARMv6 + id: upload-release-asset + uses: actions/upload-release-asset@v1 + 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: ./artifacts/zerobot-plugin-linux-armv6 + asset_name: zerobot-plugin-linux-armv6 + asset_content_type: application/octet-stream + \ No newline at end of file