From e578d9fe51ccda42956fe82f32eb5e54f13133b5 Mon Sep 17 00:00:00 2001 From: Moritz Zwerger Date: Mon, 22 Jan 2024 01:04:50 +0100 Subject: [PATCH] test --- .gitlab-ci.yml | 23 ++++++++++++++++++++++- release/create.sh | 22 ++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 release/create.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ed4e31e61..d8f52ce15 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/release/create.sh b/release/create.sh new file mode 100644 index 000000000..904d556a4 --- /dev/null +++ b/release/create.sh @@ -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 . +# +# 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