diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 00000000..1b04a7bd --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,75 @@ +name: Go + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + build: + name: create-eboot + runs-on: ubuntu-latest + steps: + + - name: Set up Go 1.x + uses: actions/setup-go@v2 + with: + go-version: ^1.13 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Get dependencies + run: | + go get -v -t -d ./... + if [ -f Gopkg.toml ]; then + curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh + dep ensure + fi + + - name: Build create-eboot windows + run: | + cd src/tools/create-eboot + GOOS=windows go build -ldflags='-X main.TOOL_MODE=SELF' -o create-eboot.exe + + - name: Upload create-eboot windows + uses: actions/upload-artifact@v2 + with: + name: create-eboot.exe + path: src/tools/create-eboot/create-eboot.exe + + - name: Build create-eboot linux + run: | + cd src/tools/create-eboot + go build -ldflags='-X main.TOOL_MODE=SELF' -o create-eboot + + - name: Upload create-eboot linux + uses: actions/upload-artifact@v2 + with: + name: create-eboot + path: src/tools/create-eboot/create-eboot + + - name: Build create-lib windows + run: | + cd src/tools/create-eboot + GOOS=windows go build -ldflags='-X main.TOOL_MODE=SPRX' -o create-lib.exe + + - name: Upload create-lib windows + uses: actions/upload-artifact@v2 + with: + name: create-lib.exe + path: src/tools/create-eboot/create-lib.exe + + - name: Build create-lib linux + run: | + cd src/tools/create-eboot + go build -ldflags='-X main.TOOL_MODE=SPRX' -o create-lib + + - name: Upload create-lib linux + uses: actions/upload-artifact@v2 + with: + name: create-lib + path: src/tools/create-eboot/create-lib