Compare commits

...

2 Commits

Author SHA1 Message Date
3fb8859a29 Removed Gitlab CI pipeline.
All checks were successful
Build Plugin JAR File / Build (push) Successful in 11s
2024-05-18 21:23:21 -04:00
42de884b65 Added Gitea Actions workflow for building plugin JAR artifact.
All checks were successful
Build Plugin JAR File / Build (push) Successful in 11s
2024-05-18 21:10:40 -04:00
2 changed files with 24 additions and 41 deletions

View File

@@ -0,0 +1,24 @@
name: Build Plugin JAR File
on: [push]
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Java environment
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Build artifact
run: chmod +x ./gradlew && ./gradlew build --no-daemon
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: Plugin JAR
path: build/libs/Snowbrawl-2.jar

View File

@@ -1,41 +0,0 @@
stages:
- build
- publish
variables:
JAR_PATH: "build/libs/Snowbrawl-2.jar"
build:
stage: build
tags:
- docker
image: openjdk:17-jdk
script:
- chmod +x gradlew
- ./gradlew build
artifacts:
name: Snowbrawl-$CI_COMMIT_REF_SLUG-$CI_JOB_NAME
paths:
- $JAR_PATH
expire_in: 1 day
publish:
stage: publish
tags:
- docker
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: $CI_COMMIT_TAG
before_script:
- apk add --no-cache curl
script:
- curl --header "JOB-TOKEN:$CI_JOB_TOKEN" --upload-file $JAR_PATH "$CI_API_V4_URL/projects/$CI_PROJECT_ID/packages/generic/release/$CI_COMMIT_TAG/Snowbrawl_$CI_COMMIT_TAG.jar"
release:
name: "Snowbrawl $CI_COMMIT_TAG"
description: "Automatic Snowbrawl release from tag $CI_COMMIT_TAG."
tag_name: "$CI_COMMIT_TAG"
ref: "$CI_COMMIT_TAG"
assets:
links:
- name: "Snowbrawl_$CI_COMMIT_TAG.jar"
url: "$CI_API_V4_URL/projects/$CI_PROJECT_ID/packages/generic/release/$CI_COMMIT_TAG/Snowbrawl_$CI_COMMIT_TAG.jar"