41 lines
1.4 KiB
YAML
41 lines
1.4 KiB
YAML
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/*
|