mirror of
https://github.com/sorenisanerd/gotty.git
synced 2024-12-17 21:54:24 +00:00
Publish artifacts on push to master
This commit is contained in:
parent
679a3247c6
commit
95c0992b23
36
.github/workflows/pre-release.yaml
vendored
Normal file
36
.github/workflows/pre-release.yaml
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
---
|
||||||
|
name: "pre-release"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "gh-workflows"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
pre-release:
|
||||||
|
name: "Pre Release"
|
||||||
|
runs-on: "ubuntu-latest"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: 1.16
|
||||||
|
|
||||||
|
|
||||||
|
- name: "Build & test"
|
||||||
|
run: "make tools release-artifacts"
|
||||||
|
|
||||||
|
- uses: "marvinpinto/action-automatic-releases@latest"
|
||||||
|
with:
|
||||||
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
automatic_release_tag: "latest"
|
||||||
|
prerelease: true
|
||||||
|
title: "Development Build"
|
||||||
|
files: |
|
||||||
|
LICENSE
|
||||||
|
builds/dist/*
|
12
Makefile
12
Makefile
@ -3,21 +3,21 @@ GIT_COMMIT = `git rev-parse HEAD | cut -c1-7`
|
|||||||
VERSION = $(shell git describe --tags)
|
VERSION = $(shell git describe --tags)
|
||||||
BUILD_OPTIONS = -ldflags "-X main.Version=$(VERSION)"
|
BUILD_OPTIONS = -ldflags "-X main.Version=$(VERSION)"
|
||||||
|
|
||||||
gotty: main.go server/*.go webtty/*.go backend/*.go Makefile asset
|
gotty: main.go server/*.go webtty/*.go backend/*.go Makefile server/asset.go
|
||||||
go build ${BUILD_OPTIONS}
|
go build ${BUILD_OPTIONS}
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
docker build . -t gotty-bash:$(VERSION)
|
docker build . -t gotty-bash:$(VERSION)
|
||||||
|
|
||||||
.PHONY: asset
|
.PHONY: assets
|
||||||
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
|
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
|
||||||
|
|
||||||
server/asset.go: bindata/* bindata/*/* bindata/*/*/*
|
server/asset.go: assets
|
||||||
go-bindata -prefix bindata -pkg server -ignore=\\.gitkeep -o server/asset.go bindata/...
|
go-bindata -prefix bindata -pkg server -ignore=\\.gitkeep -o server/asset.go bindata/...
|
||||||
gofmt -w server/asset.go
|
gofmt -w server/asset.go
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: asset gotty docker
|
all: gotty docker
|
||||||
|
|
||||||
bindata:
|
bindata:
|
||||||
mkdir bindata
|
mkdir bindata
|
||||||
@ -91,7 +91,7 @@ targz:
|
|||||||
shasums:
|
shasums:
|
||||||
cd ${OUTPUT_DIR}/dist; sha256sum * > ./SHA256SUMS
|
cd ${OUTPUT_DIR}/dist; sha256sum * > ./SHA256SUMS
|
||||||
|
|
||||||
release-artifacts: asset gotty cross_compile targz shasums
|
release-artifacts: gotty cross_compile targz shasums
|
||||||
|
|
||||||
release:
|
release:
|
||||||
ghr -draft ${VERSION} ${OUTPUT_DIR}/dist # -c ${GIT_COMMIT} --delete --prerelease -u sorenisanerd -r gotty ${VERSION}
|
ghr -draft ${VERSION} ${OUTPUT_DIR}/dist # -c ${GIT_COMMIT} --delete --prerelease -u sorenisanerd -r gotty ${VERSION}
|
||||||
|
Loading…
Reference in New Issue
Block a user