Skip to content

Commit 6c62ab7

Browse files
committed
Publish artifacts on push to master
1 parent 679a324 commit 6c62ab7

File tree

2 files changed

+43
-6
lines changed

2 files changed

+43
-6
lines changed

.github/workflows/pre-release.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: "pre-release"
3+
4+
on:
5+
push:
6+
branches:
7+
- "master"
8+
9+
10+
jobs:
11+
pre-release:
12+
name: "Pre Release"
13+
runs-on: "ubuntu-latest"
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Set up Go
21+
uses: actions/setup-go@v2
22+
with:
23+
go-version: 1.16
24+
25+
26+
- name: "Build & test"
27+
run: "make tools release-artifacts"
28+
29+
- uses: "marvinpinto/action-automatic-releases@latest"
30+
with:
31+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
32+
automatic_release_tag: "latest"
33+
prerelease: true
34+
title: "Development Build"
35+
files: |
36+
LICENSE
37+
builds/dist/*

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ GIT_COMMIT = `git rev-parse HEAD | cut -c1-7`
33
VERSION = $(shell git describe --tags)
44
BUILD_OPTIONS = -ldflags "-X main.Version=$(VERSION)"
55

6-
gotty: main.go server/*.go webtty/*.go backend/*.go Makefile asset
6+
gotty: main.go server/*.go webtty/*.go backend/*.go Makefile server/asset.go
77
go build ${BUILD_OPTIONS}
88

99
docker:
1010
docker build . -t gotty-bash:$(VERSION)
1111

12-
.PHONY: asset
13-
asset: bindata/static/js/gotty.js bindata/static/index.html bindata/static/icon.svg bindata/static/favicon.ico bindata/static/css/index.css bindata/static/css/xterm.css bindata/static/css/xterm_customize.css bindata/static/manifest.json bindata/static/icon_192.png server/asset.go
12+
.PHONY: assets
13+
assets: bindata/static/js/gotty.js bindata/static/index.html bindata/static/icon.svg bindata/static/favicon.ico bindata/static/css/index.css bindata/static/css/xterm.css bindata/static/css/xterm_customize.css bindata/static/manifest.json bindata/static/icon_192.png
1414

15-
server/asset.go: bindata/* bindata/*/* bindata/*/*/*
15+
server/asset.go: assets
1616
go-bindata -prefix bindata -pkg server -ignore=\\.gitkeep -o server/asset.go bindata/...
1717
gofmt -w server/asset.go
1818

1919
.PHONY: all
20-
all: asset gotty docker
20+
all: gotty docker
2121

2222
bindata:
2323
mkdir bindata
@@ -91,7 +91,7 @@ targz:
9191
shasums:
9292
cd ${OUTPUT_DIR}/dist; sha256sum * > ./SHA256SUMS
9393

94-
release-artifacts: asset gotty cross_compile targz shasums
94+
release-artifacts: gotty cross_compile targz shasums
9595

9696
release:
9797
ghr -draft ${VERSION} ${OUTPUT_DIR}/dist # -c ${GIT_COMMIT} --delete --prerelease -u sorenisanerd -r gotty ${VERSION}

0 commit comments

Comments
 (0)