mirror of
https://github.com/drakkan/sftpgo.git
synced 2026-03-23 02:04:38 +01:00
35 lines
819 B
YAML
35 lines
819 B
YAML
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
|