Changed CI Workflow
This commit is contained in:
parent
98cc61e60a
commit
cba5b23686
2 changed files with 72 additions and 7 deletions
64
.drone.yml
64
.drone.yml
|
@ -27,7 +27,36 @@ steps:
|
|||
- chmod +x ci-dependencies.sh
|
||||
- chmod +x build.sh
|
||||
- ./ci-dependencies.sh
|
||||
- sh build.sh
|
||||
- bash build.sh
|
||||
|
||||
- name: Release_binary s3 (test)
|
||||
image: plugins/s3
|
||||
settings:
|
||||
endpoint: https://s3.hackmi.ch
|
||||
bucket: amogusspecialsauce
|
||||
access_key:
|
||||
from_secret: access_key
|
||||
secret_key:
|
||||
from_secret: secret_key
|
||||
source: dist/*
|
||||
target: /b/main
|
||||
|
||||
steps:
|
||||
- name: discord notification
|
||||
image: appleboy/drone-discord
|
||||
settings:
|
||||
webhook_id:
|
||||
from_secret: webhook_id
|
||||
webhook_token:
|
||||
from_secret: webhook_token
|
||||
message: >
|
||||
{{#success build.status}}
|
||||
Test-Build {{build.number}} succeeded.
|
||||
Download: https://s3.hackmi.ch/amogusspecialsauce/b/main/compiled-${DRONE_COMMIT_SHA:0:10}.zip
|
||||
{{else}}
|
||||
Test-Build {{build.number}} failed.
|
||||
See: {{build.link}}
|
||||
{{/success}}
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
|
@ -64,9 +93,9 @@ steps:
|
|||
- chmod +x ci-dependencies.sh
|
||||
- chmod +x build.sh
|
||||
- ./ci-dependencies.sh
|
||||
- sh build.sh
|
||||
- bash build.sh
|
||||
|
||||
- name: Release_binary (amd64,prod)
|
||||
- name: Release_binary git (prod)
|
||||
image: plugins/gitea-release
|
||||
settings:
|
||||
api_key:
|
||||
|
@ -75,6 +104,35 @@ steps:
|
|||
files: dist/*
|
||||
checksum: md5,sha256
|
||||
|
||||
- name: Release_binary s3 (prod)
|
||||
image: plugins/s3
|
||||
settings:
|
||||
endpoint: https://s3.hackmi.ch
|
||||
bucket: amogusspecialsauce
|
||||
access_key:
|
||||
from_secret: access_key
|
||||
secret_key:
|
||||
from_secret: secret_key
|
||||
source: dist/*
|
||||
target: /releases
|
||||
|
||||
steps:
|
||||
- name: discord notification
|
||||
image: appleboy/drone-discord
|
||||
settings:
|
||||
webhook_id:
|
||||
from_secret: webhook_id
|
||||
webhook_token:
|
||||
from_secret: webhook_token
|
||||
message: >
|
||||
{{#success build.status}}
|
||||
Test-Build {{build.number}} succeeded.
|
||||
Download: https://s3.hackmi.ch/amogusspecialsauce/releases/compiled-${DRONE_TAG}.zip
|
||||
{{else}}
|
||||
Test-Build {{build.number}} failed.
|
||||
See: {{build.link}}
|
||||
{{/success}}
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
15
build.sh
15
build.sh
|
@ -1,4 +1,4 @@
|
|||
#!/bin/ash
|
||||
#!/bin/bash
|
||||
base=xonotic-data.pk3dir
|
||||
|
||||
# Apply specialsauce
|
||||
|
@ -19,8 +19,15 @@ mkdir -vp $(dirname "$0")/compiled
|
|||
mv -v *.dat $(dirname "$0")/compiled
|
||||
rm *.lno
|
||||
mkdir dist
|
||||
if [[ -z "${DRONE_TAG}" ]]; then
|
||||
zip -9 dist/compiled-$DRONE_TAG.zip compiled/csprogs.dat compiled/progs.dat compiled/menu.dat
|
||||
if [[ -n "${DRONE_TAG}" ]]
|
||||
then
|
||||
echo "Making ready for Tag: $DRONE_TAG"
|
||||
zip -9 dist/compiled-$DRONE_TAG.zip compiled/csprogs.dat compiled/progs.dat compiled/menu.dat
|
||||
elif [[ -n "${DRONE_COMMIT_SHA}" ]]
|
||||
then
|
||||
COMMIT_SHA = ${DRONE_COMMIT_SHA:0:10}
|
||||
echo "Making ready for Commit: $COMMIT_SHA"
|
||||
zip -9 dist/compiled-$COMMIT_SHA.zip compiled/csprogs.dat compiled/progs.dat compiled/menu.dat
|
||||
else
|
||||
zip -9 dist/compiled.zip compiled/csprogs.dat compiled/progs.dat compiled/menu.dat
|
||||
zip -9 dist/compiled.zip compiled/csprogs.dat compiled/progs.dat compiled/menu.dat
|
||||
fi
|
Loading…
Reference in a new issue