Skip to content

Commit f34a4f6

Browse files
committed
Deploy graphkb on Github when branch is tagged.
1 parent 7bcbd22 commit f34a4f6

File tree

3 files changed

+27
-5
lines changed

3 files changed

+27
-5
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,8 @@
1515
# vendor/
1616

1717
.vscode
18+
19+
# Release artifacts
20+
*.tar.gz
21+
go-graphkb
22+
importer-csv

.travis.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
language: go
22

33
go:
4-
- 1.13.x
4+
- 1.13.x
55

66
script:
7-
- go test -v ./...
8-
- pushd web && npm ci && npm run build && popd
9-
- go build -o go-graphkb cmd/go-graphkb/main.go
10-
- go build -o importer-csv cmd/importer-csv/main.go
7+
- .travis/run.sh
8+
9+
before_deploy:
10+
- echo Deploying GraphKB $TRAVIS_TAG to GitHub Releases
11+
deploy:
12+
provider: releases
13+
api_key: "$GITHUB_API_KEY"
14+
file_glob: true
15+
file: "graphkb-$TRAVIS_TAG.tar.gz"
16+
skip_cleanup: true
17+
on:
18+
tags: true

.travis/run.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
go test -v ./...
4+
5+
pushd web && npm ci && npm run build && popd
6+
go build -o go-graphkb cmd/go-graphkb/main.go
7+
go build -o importer-csv cmd/importer-csv/main.go
8+
9+
tar cvf graphkb.tar.gz web/build go-graphkb importer-csv

0 commit comments

Comments
 (0)