aboutsummaryrefslogtreecommitdiff
path: root/github-upload.sh
blob: 2a5f6534d1d08153567e54be8c3a826afa822467 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/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.dmg \
     "https://uploads.github.com/repos/jgm/pandoc/releases/$FULLNAME/assets?name=$FULLNAME.dmg"

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/$FULLNAME/assets?name=$FULLNAME.msi"