-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
executable file
·39 lines (33 loc) · 1.09 KB
/
release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
# TODO: use cmd line args for pre-release option
VERSION=$(cat package.json | jq -r '.version')
USER=$(cat package.json | jq -r '.author')
REPO=$(cat package.json | jq -r '.name')
PRODUCT_NAME=$(cat package.json | jq -r '.build.productName')
# Release packaged application
yarn run build
# Assumes https://github.com/aktau/github-release is installed on PATH
echo "Pushing release ${VERSION}"
github-release release \
--user ${USER} \
--repo ${REPO} \
--tag v${VERSION} \
--name "${VERSION}" \
--description "$1" \
--pre-release
echo "Uploading linux AppImage..."
github-release upload \
--user ${USER} \
--repo ${REPO} \
--tag v${VERSION} \
--name "${REPO}-${VERSION}-x86_64.AppImage" \
--file build/${REPO}-${VERSION}-x86_64.AppImage
echo "Linux AppImage upload complete!"
echo "Uploading windows installer..."
github-release upload \
--user ${USER} \
--repo ${REPO} \
--tag v${VERSION} \
--name "${PRODUCT_NAME} Win Setup ${VERSION}.exe" \
--file build/${PRODUCT_NAME}\ Setup\ ${VERSION}.exe
echo "Windows installer upload complete!"