Skip to content

Settings for automatic release #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ bin/

# OSX
.DS_Store

# PGP keys
pubring.gpg
secring.gpg
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ jdk:
script:
- git clone https://github.com/scala-exercises/site.git site
- pushd site; sbt 'definitions/publishLocal' 'runtime/publishLocal' 'compiler/publishLocal' 'sbt-exercise/publishLocal' ; popd
- sbt test
- sbt test
after_success:
- bash deploy.sh
23 changes: 23 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh

function decipherKeys {
echo $KEYS_PASSPHRASE | gpg --passphrase-fd 0 keys.tar.gpg
tar xfv keys.tar
}

function publish {
sbt compile publishSigned
}

function release {
decipherKeys
publish
}

if [[ $TRAVIS_BRANCH == 'master' ]]; then
echo "Master branch, releasing..."
release
else
echo "Not in master branch, skipping release"
fi

Binary file added keys.tar.gpg
Binary file not shown.