-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
59a647b
commit 2bbb3fe
Showing
3 changed files
with
59 additions
and
2 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
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,23 @@ | ||
{ pkgs }: | ||
(pkgs.writeScriptBin "deploy" '' | ||
#!${pkgs.runtimeShell} -e | ||
export PATH="${pkgs.stdenv.lib.makeBinPath (with pkgs; [github-release])}" | ||
## $GITHUB_TOKEN must be a `personal access token` with scope `public_repo`. | ||
## The owner of the token must be projekt owner of the repo. | ||
[ -n "$GITHUB_TOKEN" ] | ||
export GITHUB_USER="$CIRCLE_PROJECT_USERNAME" | ||
export GITHUB_REPO="$CIRCLE_PROJECT_REPONAME" | ||
export TAG="''${CIRCLE_TAG:-$CIRCLE_BRANCH}" | ||
export FILE="$1" | ||
export NAME="$2" | ||
if github-release info -t $TAG ; then | ||
github-release delete -t $TAG | ||
fi | ||
github-release release -t $TAG | ||
github-release upload -t $TAG -f "$FILE" -n "$NAME" | ||
'') |
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