From f5acd61fea5297e9d1b508bda459c6bd89107099 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E7=BA=A2=E5=B2=A9?= Date: Sun, 29 Sep 2024 23:32:37 +0800 Subject: [PATCH] U: Add build energy-cli --- .github/workflows/build-energy-cli.yml | 37 ++++++++++++++++++++++++++ .github/workflows/build-test.yml | 2 +- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build-energy-cli.yml diff --git a/.github/workflows/build-energy-cli.yml b/.github/workflows/build-energy-cli.yml new file mode 100644 index 00000000..ed0208da --- /dev/null +++ b/.github/workflows/build-energy-cli.yml @@ -0,0 +1,37 @@ +# This workflow will build a golang project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go + +name: build-energy-cli + +on: + workflow_dispatch: + +jobs: + + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [windows-2019] + + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: '1.20' + + - name: Build CLI + run: | + cd ./cmd/energy/md5 + go install + cd ../ + .\build.bat + 7z a energy-windows-32.zip energy-windows-32.exe + 7z a energy-windows-64.zip energy-windows-64.exe + 7z a energy-darwin-64.zip energy-darwin-64 + 7z a energy-darwinarm-64.zip energy-darwinarm-64 + 7z a energy-linux-64.zip energy-linux-64 + 7z a energy-linuxarm-64.zip energy-linuxarm-64 + dir \ No newline at end of file diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 0529ee3d..77ebba25 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -1,7 +1,7 @@ # This workflow will build a golang project # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go -name: Go +name: build-test on: push: