From 39ec2d034eb7b0e1c04276a223f44f24d7dfc167 Mon Sep 17 00:00:00 2001 From: Baipyrus <39416358+Baipyrus@users.noreply.github.com> Date: Sun, 1 Sep 2024 13:01:45 +0200 Subject: [PATCH] create build.yml workflow --- .github/workflows/build.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..3a84130 --- /dev/null +++ b/.github/workflows/build.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: Go + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - run: sed -En 's/^go (.*)$/GO_VERSION=\1/p' go.mod >> $GITHUB_ENV + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: "${{ env.GO_VERSION }}" + + - name: Install dependencies + run: | + go get . + + - name: Build project + run: go build ./... + + - name: Upload executable + uses: actions/upload-artifact@v4 + with: + name: ProxySwitcher Executable + path: ./ProxySwitcher.exe