mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Implement automatic Github releases
I hope this will create a git tag and upload a release for us.
This commit is contained in:
parent
8fa794f282
commit
1273d5f2b5
1
.gitignore
vendored
1
.gitignore
vendored
@ -17,3 +17,4 @@ cypress.env.json
|
|||||||
!.gitkeep
|
!.gitkeep
|
||||||
**/coverage
|
**/coverage
|
||||||
|
|
||||||
|
release/
|
||||||
|
|||||||
@ -62,6 +62,7 @@ after_failure:
|
|||||||
- ./send.sh failure $WEBHOOK_URL
|
- ./send.sh failure $WEBHOOK_URL
|
||||||
|
|
||||||
before_deploy:
|
before_deploy:
|
||||||
|
- go get -u github.com/tcnksm/ghr
|
||||||
- ./scripts/setup_kubernetes.sh
|
- ./scripts/setup_kubernetes.sh
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
@ -73,3 +74,7 @@ deploy:
|
|||||||
script: scripts/deploy.sh
|
script: scripts/deploy.sh
|
||||||
on:
|
on:
|
||||||
branch: master
|
branch: master
|
||||||
|
- provider: script
|
||||||
|
script: scripts/github_release.sh
|
||||||
|
on:
|
||||||
|
branch: master
|
||||||
|
|||||||
22
scripts/github_release.sh
Executable file
22
scripts/github_release.sh
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
ROOT_DIR=$(dirname "$0")/..
|
||||||
|
RELEASE_DIR="${ROOT_DIR}/release"
|
||||||
|
|
||||||
|
VERSION=$(<$ROOT_DIR/VERSION)
|
||||||
|
|
||||||
|
mkdir -p $RELEASE_DIR
|
||||||
|
|
||||||
|
# The following command part produces 854M on my machine
|
||||||
|
# apps=(nitro-web nitro-backend neo4j maintenance-worker maintenance)
|
||||||
|
# for app in "${apps[@]}"
|
||||||
|
# do
|
||||||
|
# docker image save "humanconnection/${app}:latest" | gzip > "${RELEASE_DIR}/${app}.${VERSION}.tar.gz"
|
||||||
|
# done
|
||||||
|
|
||||||
|
# Use something smaller instead
|
||||||
|
git archive --format tar HEAD:backend | gzip > "${RELEASE_DIR}/backend.${VERSION}.tar.gz"
|
||||||
|
git archive --format tar HEAD:webapp | gzip > "${RELEASE_DIR}/webapp.${VERSION}.tar.gz"
|
||||||
|
git archive --format zip HEAD:backend > "${RELEASE_DIR}/backend.${VERSION}.zip"
|
||||||
|
git archive --format zip HEAD:webapp > "${RELEASE_DIR}/webapp.${VERSION}.zip"
|
||||||
|
|
||||||
|
ghr -soft "${VERSION}" "${RELEASE_DIR}"
|
||||||
Loading…
x
Reference in New Issue
Block a user