From 090bbcc61b33489fa34e756486fe323bd220ffb5 Mon Sep 17 00:00:00 2001 From: JustSong Date: Thu, 28 Jul 2022 23:38:53 +0800 Subject: [PATCH] :construction_worker: use GitHub Actions to build client --- .github/workflows/build-client.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/build-client.yml diff --git a/.github/workflows/build-client.yml b/.github/workflows/build-client.yml new file mode 100644 index 0000000..42769da --- /dev/null +++ b/.github/workflows/build-client.yml @@ -0,0 +1,30 @@ +name: Build Client + +on: + push: + tags: + - '*' +jobs: + release: + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v3 + - name: Build + run: | + cd client + go mod download + go build -ldflags "-s -w -extldflags '-static'" -o message-receiver.exe + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: | + client/message-receiver.exe + client/starter.vbs + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file