-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(travis): implement initial release deployment (#1)
- Loading branch information
Showing
3 changed files
with
121 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
os: | ||
- linux | ||
- osx | ||
- windows | ||
|
||
language: c | ||
|
||
cache: | ||
directories: | ||
- "$HOME/.nimble" | ||
- "$HOME/.choosenim" | ||
- "$HOME/nim" | ||
|
||
branches: | ||
except: | ||
- gh-pages | ||
|
||
install: | ||
- | | ||
if [ $TRAVIS_OS_NAME != windows ]; then | ||
export CHOOSENIM_CHOOSE_VERSION=stable | ||
curl https://nim-lang.org/choosenim/init.sh -sSf | sh | ||
fi | ||
- | | ||
if [ $TRAVIS_OS_NAME == windows ]; then | ||
if [ ! -d directory ]; then | ||
curl -sS https://nim-lang.org/download/nim-0.19.0_x64.zip > nim.zip | ||
7z x nim.zip | ||
mv nim-0.19.0 nim | ||
mv nim $HOME/ | ||
fi | ||
export PATH=$HOME/nim/bin:$PATH | ||
fi | ||
- export PATH=$HOME/.nimble/bin:$PATH | ||
- nimble refresh -y | ||
|
||
script: | ||
- nimble install -y | ||
- nimble build_current | ||
|
||
after_script: | ||
- fugitive --version | ||
|
||
deploy: | ||
- provider: script | ||
script: bash .travis_release | ||
on: | ||
tags: true | ||
|
||
notifications: | ||
email: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#! /bin/bash | ||
|
||
set -u # error on undefined variables | ||
set -e # exit on first error | ||
|
||
echo_run () { | ||
printf "\n$*\n" | ||
"$@" | ||
} | ||
|
||
asset=$(find dist/fugitive_v*) | ||
notesFile=dist/notes.md | ||
|
||
# create a file with only this tag's release notes | ||
echo_run fugitive changelog $notesFile \ | ||
-t:$TRAVIS_TAG \ | ||
--no-anchor --no-title --no-divider \ | ||
-o | ||
|
||
# upload the release asset to GitHub | ||
echo_run fugitive release $TRAVIS_TAG \ | ||
-r:"$TRAVIS_REPO_SLUG" \ | ||
-f:"$asset" \ | ||
-D:"$notesFile" \ | ||
-p -N |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters