From 7493292e3853ea35fa46dffd5830c204a03aeeab Mon Sep 17 00:00:00 2001 From: Gregory Rudolph Date: Tue, 6 Oct 2020 17:28:12 -0400 Subject: [PATCH] Create go.yml --- .github/workflows/go.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..20b281b --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,39 @@ +name: Go +on: [push] +jobs: + build: + strategy: + matrix: + platform: [ubuntu-latest, macos-latest, windows-latest] + name: Build + runs-on: ${{ matrix.platform }} + steps: + + - name: Set up Go 1.15 + uses: actions/setup-go@v1 + with: + go-version: 1.15 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v1 + + - name: Get dependencies + run: | + go get -v -t -d ./... + go get github.com/magefile/mage + - name: Build + run: go build + - name: Upload Artifact + if: matrix.platform != 'windows-latest' + uses: actions/upload-artifact@v1.0.0 + with: + name: mfprint + path: mfprint + + - name: Upload Artifact + if: matrix.platform == 'windows-latest' + uses: actions/upload-artifact@v1.0.0 + with: + name: mfprint + path: mfprint.exe