This commit is contained in:
parent
a753f3687c
commit
2eb837f8cf
@ -0,0 +1,40 @@
|
|||||||
|
name: JConf Actions Workflow
|
||||||
|
run-name: Deploy to ${{ inputs.deploy_target }} by ${{ gitea.actor }}
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup JDK 21
|
||||||
|
uses: actions/setup-java@v4.4.0
|
||||||
|
with:
|
||||||
|
java-version: 21
|
||||||
|
distribution: 'temurin'
|
||||||
|
- name: Configure Git
|
||||||
|
run: |
|
||||||
|
git config --global user.email "git@nevets.tech"
|
||||||
|
git config --global user.name "Gitea Actions"
|
||||||
|
- name: Grant execute permission for gradlew
|
||||||
|
run: chmod +x gradlew
|
||||||
|
- name: Build JConf
|
||||||
|
run: ./gradlew clean build shadowJar
|
||||||
|
- name: Prepare Artifacts
|
||||||
|
run: |
|
||||||
|
rm -rf ./artifacts
|
||||||
|
mkdir -p "./artifacts"
|
||||||
|
export VERSION=$(grep version build.gradle | grep -vE id | grep -vE : | awk -F"'" '/version/{print$2}')
|
||||||
|
echo $VERSION
|
||||||
|
cp -v "./build/libs/JConf-$VERSION.jar" "./artifacts/JConf-$VERSION-no-deps.jar"
|
||||||
|
cp -v "./build/libs/JConf-$VERSION-all.jar" "./artifacts/JConf-$VERSION.jar"
|
||||||
|
- name: Maven Upload
|
||||||
|
run: |
|
||||||
|
export giteaUser=${{ secrets.USERNAME_GITEA }}
|
||||||
|
export giteaPass=${{ secrets.ACCESS_TOKEN_GITEA }}
|
||||||
|
./gradlew publish
|
||||||
|
- name: Upload JConf Artifacts
|
||||||
|
uses: actions/upload-artifacts@v4
|
||||||
|
with:
|
||||||
|
name: JConf
|
||||||
|
path: artifacts/*
|
@ -18,11 +18,11 @@ apply plugin: 'maven-publish'
|
|||||||
publishing {
|
publishing {
|
||||||
publications{
|
publications{
|
||||||
publish(MavenPublication) {
|
publish(MavenPublication) {
|
||||||
artifact("gitea/JConf-$version" + "-no-deps.jar") {
|
artifact("artifacts/JConf-$version" + "-no-deps.jar") {
|
||||||
classifier 'no-deps'
|
classifier 'no-deps'
|
||||||
extension 'jar'
|
extension 'jar'
|
||||||
}
|
}
|
||||||
artifact("gitea/JConf-$version" + ".jar") {
|
artifact("artifacts/JConf-$version" + ".jar") {
|
||||||
extension 'jar'
|
extension 'jar'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user