This commit is contained in:
Moritz Zwerger 2024-01-22 01:04:50 +01:00
parent 406cbf3d59
commit e578d9fe51
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
2 changed files with 44 additions and 1 deletions

View File

@ -1,4 +1,4 @@
image: openjdk:11-jdk-slim
image: azul/zulu-openjdk-alpine:11-latest
variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
@ -8,9 +8,11 @@ before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle_home
stages:
- create
- build
- test
- package
- publish
cache:
@ -34,6 +36,15 @@ cache:
paths:
- ./it
create:
stage: create
image: alpine:latest
script:
- apk add git curl
- ./release/create.sh
only:
- master
build:
stage: build
script: ./gradlew --build-cache assemble -Pminosoft.updates=true
@ -56,9 +67,19 @@ package:
stage: package
script:
- ./gradlew fatJar --stacktrace -Pminosoft.updates=true
- apk add git curl
- ./release/upload.sh
only:
- master
artifacts:
paths:
- build/libs/minosoft-fat-*.jar
expire_in: 1 days
publish:
stage: publish
image: alpine:latest
script:
- ./release/release.sh
only:
- master

22
release/create.sh Normal file
View File

@ -0,0 +1,22 @@
#!/bin/ash
#
# Minosoft
# Copyright (C) 2020-2024 Moritz Zwerger
#
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# This software is not affiliated with Mojang AB, the original developer of Minecraft.
#
curl \
--form-string "stable=false" \
-F "page=" \
-F "release_notes=abc" \
-F "channel=test" \
-H "Authorization: Bearer ..Hs6dpK_aHBWeuasq2MA2c_zBw1JCJsgk4Lcw2fm1PoI" \
localhost:8080/api/v1/releases/create/test
# https://minosoft.bixilon.de/api/v1/releases/create/test