Deploy binaries to GitHub releases (Linux/MacOS)
This commit is contained in:
parent
c668bdcf50
commit
8cc49f574e
31
.travis.yml
31
.travis.yml
|
@ -17,3 +17,34 @@ env:
|
||||||
- BUILD=dub
|
- BUILD=dub
|
||||||
|
|
||||||
script: ./.travis.sh
|
script: ./.travis.sh
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
include:
|
||||||
|
- stage: GitHub Release
|
||||||
|
if: tag IS present
|
||||||
|
d: ldc
|
||||||
|
os: linux
|
||||||
|
script: echo "Deploying to GitHub releases ..." && make release
|
||||||
|
deploy:
|
||||||
|
provider: releases
|
||||||
|
api_key: $GH_REPO_TOKEN
|
||||||
|
file_glob: true
|
||||||
|
file: bin/dcd-*.tar.gz
|
||||||
|
skip_cleanup: true
|
||||||
|
on:
|
||||||
|
repo: dlang-community/dcd
|
||||||
|
tags: true
|
||||||
|
- stage: GitHub Release
|
||||||
|
if: tag IS present
|
||||||
|
d: ldc
|
||||||
|
os: osx
|
||||||
|
script: echo "Deploying to GitHub releases ..." && make release
|
||||||
|
deploy:
|
||||||
|
provider: releases
|
||||||
|
api_key: $GH_REPO_TOKEN
|
||||||
|
file_glob: true
|
||||||
|
file: bin/dcd-*.tar.gz
|
||||||
|
skip_cleanup: true
|
||||||
|
on:
|
||||||
|
repo: dlang-community/dcd
|
||||||
|
tags: true
|
||||||
|
|
27
makefile
27
makefile
|
@ -14,6 +14,8 @@ DPARSE_DIR := libdparse
|
||||||
DSYMBOL_DIR := dsymbol
|
DSYMBOL_DIR := dsymbol
|
||||||
STDXALLOC_DIR := stdx-allocator
|
STDXALLOC_DIR := stdx-allocator
|
||||||
|
|
||||||
|
SHELL:=/bin/bash
|
||||||
|
|
||||||
githash:
|
githash:
|
||||||
git log -1 --format="%H" > githash.txt
|
git log -1 --format="%H" > githash.txt
|
||||||
|
|
||||||
|
@ -147,3 +149,28 @@ ldcserver: githash
|
||||||
|
|
||||||
test: debugserver dmdclient
|
test: debugserver dmdclient
|
||||||
cd tests && ./run_tests.sh
|
cd tests && ./run_tests.sh
|
||||||
|
|
||||||
|
.ONESHELL:
|
||||||
|
release:
|
||||||
|
@set -eux -o pipefail
|
||||||
|
VERSION=$$(git describe --abbrev=0 --tags)
|
||||||
|
ARCH="$${ARCH:-64}"
|
||||||
|
unameOut="$$(uname -s)"
|
||||||
|
case "$$unameOut" in
|
||||||
|
Linux*) OS=linux; ;;
|
||||||
|
Darwin*) OS=osx; ;;
|
||||||
|
*) echo "Unknown OS: $$unameOut"; exit 1
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$$ARCH" in
|
||||||
|
64) ARCH_SUFFIX="x86_64";;
|
||||||
|
32) ARCH_SUFFIX="x86";;
|
||||||
|
*) echo "Unknown ARCH: $$ARCH"; exit 1
|
||||||
|
esac
|
||||||
|
|
||||||
|
archiveName="dcd-$$VERSION-$$OS-$$ARCH_SUFFIX.tar.gz"
|
||||||
|
|
||||||
|
echo "Building $$archiveName"
|
||||||
|
${MAKE} ldcclient
|
||||||
|
${MAKE} ldcserver
|
||||||
|
tar cvfz "bin/$$archiveName" -C bin dcd-client dcd-server
|
||||||
|
|
Loading…
Reference in New Issue