Move to new CI/CD
Build and publish releases / release (push) Failing after 20s
Details
Build and publish releases / release (push) Failing after 20s
Details
parent
c4603bae60
commit
f6c2131980
|
@ -0,0 +1,40 @@
|
||||||
|
name: "Build and publish releases"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags: "v*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
if: github.repository_owner == 'mc'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Set up JDK 17
|
||||||
|
uses: github.com/actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
java-version: '17'
|
||||||
|
distribution: 'temurin'
|
||||||
|
|
||||||
|
- name: "build"
|
||||||
|
run: |
|
||||||
|
./gradlew build
|
||||||
|
|
||||||
|
- name: "move releases"
|
||||||
|
run: |
|
||||||
|
mkdir release
|
||||||
|
mv build/libs/*.jar release
|
||||||
|
|
||||||
|
- name: "publish release"
|
||||||
|
uses: https://code.forgejo.org/actions/forgejo-release@v1
|
||||||
|
with:
|
||||||
|
direction: upload
|
||||||
|
release-dir: release
|
||||||
|
token: ${{ secrets.TOKEN }}
|
||||||
|
|
||||||
|
- name: "publish to maven"
|
||||||
|
env:
|
||||||
|
MAVEN_REPO_URL: "https://git.kallestruik.nl/api/packages/mc/maven"
|
||||||
|
MAVEN_REPO_TOKEN: ${{ secrets.TOKEN }}
|
||||||
|
run: |
|
||||||
|
./gradlew publishReleasePublicationToMavenRepository
|
|
@ -1,33 +0,0 @@
|
||||||
pipeline:
|
|
||||||
build:
|
|
||||||
image: "eclipse-temurin:17-jdk"
|
|
||||||
commands:
|
|
||||||
- "./gradlew assemble"
|
|
||||||
test:
|
|
||||||
image: "eclipse-temurin:17-jdk"
|
|
||||||
commands:
|
|
||||||
- "./gradlew test"
|
|
||||||
|
|
||||||
release:
|
|
||||||
image: plugins/gitea-release
|
|
||||||
settings:
|
|
||||||
api_key:
|
|
||||||
from_secret: "gitea_api_key"
|
|
||||||
base_url:
|
|
||||||
from_secret: "gitea_base_url"
|
|
||||||
files: build/libs/DLib-*.jar
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
- tag
|
|
||||||
maven:
|
|
||||||
image: "eclipse-temurin:17-jdk"
|
|
||||||
commands:
|
|
||||||
- "./gradlew publishReleasePublicationToMavenRepository"
|
|
||||||
environment:
|
|
||||||
MAVEN_REPO_URL:
|
|
||||||
from_secret: maven_repo_url
|
|
||||||
MAVEN_REPO_TOKEN:
|
|
||||||
from_secret: gitea_api_key
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
- tag
|
|
Loading…
Reference in New Issue