diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..28b759f7 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,35 @@ +name: Code Build + +on: + push: + branches: [ master ] + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + + - name: Set up Go 1.14 + uses: actions/setup-go@v2 + with: + go-version: 1.14 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Build SFTPGo + run: go build -i -ldflags "-s -w -X github.com/drakkan/sftpgo/version.commit=`git describe --always --dirty` -X github.com/drakkan/sftpgo/version.date=`date -u +%FT%TZ`" -o sftpgo + + - run: mkdir output + - run: cp sftpgo output/ + - run: cp sftpgo.json output/ + - run: cp -r templates output/ + - run: cp -r static output/ + + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: sftpgo-build + path: output