Skip to content

Merge pull request #106 from UltiKits/alpha #20

Merge pull request #106 from UltiKits/alpha

Merge pull request #106 from UltiKits/alpha #20

Workflow file for this run

name: UltiTools API CI with Maven
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package javadoc:javadoc
- name: Get Project Version from pom.xml
id: version
uses: avides/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
file-to-check: pom.xml
only-return-version: true
- name: Archive artifacts
uses: actions/[email protected]
with:
name: ultitools-artifact
path: target/UltiTools-API-${{ steps.version.outputs.version }}.jar
- name: Deploy Java DOC
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.FTP_HOST }}
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
local-dir: "./target/site/apidocs/"
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get latest commit message
id: commit
run: echo "::set-output name=message::$(git log --format=%B -n 1 ${{ github.sha }})"
- name: Get Project Version from pom.xml
id: version
uses: avides/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
file-to-check: pom.xml
only-return-version: true
- name: Download artifacts
uses: actions/[email protected]
with:
name: ultitools-artifact
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.version.outputs.version }}
release_name: Release v${{ steps.version.outputs.version }}
body: ${{ steps.commit.outputs.message }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: UltiTools-API-${{ steps.version.outputs.version }}.jar
asset_name: UltiTools-API.jar
asset_content_type: application/java-archive