add action to build code after each commit
You can download the build artifact from the "Actions->Code Build" Fixes #129
This commit is contained in:
parent
b80abe6c05
commit
3c28366fed
1 changed files with 35 additions and 0 deletions
35
.github/workflows/build.yml
vendored
Normal file
35
.github/workflows/build.yml
vendored
Normal file
|
@ -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
|
Loading…
Reference in a new issue