aboutsummaryrefslogtreecommitdiff
path: root/tools/github-upload.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/github-upload.sh')
-rwxr-xr-xtools/github-upload.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/github-upload.sh b/tools/github-upload.sh
new file mode 100755
index 000000000..875d51831
--- /dev/null
+++ b/tools/github-upload.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+VERSION=$1
+FULLNAME=pandoc-$VERSION
+read -s -p "Token (https://github.com/settings/applications): " TOKEN
+
+curl -H "Authorization: token $TOKEN" \
+ -H "Accept: application/vnd.github.manifold-preview" \
+ -H "Content-Type: application/x-apple-diskimage" \
+ --data-binary @$FULLNAME.pkg.zip \
+ "https://uploads.github.com/repos/jgm/pandoc/releases/$VERSION/assets?name=$FULLNAME.pkg.zip"
+
+curl -H "Authorization: token $TOKEN" \
+ -H "Accept: application/vnd.github.manifold-preview" \
+ -H "Content-Type: application/x-msi" \
+ --data-binary @$FULLNAME.msi \
+ "https://uploads.github.com/repos/jgm/pandoc/releases/$VERSION/assets?name=$FULLNAME.msi"
+