42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
name: Build & Release
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build-and-release:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: https://git.oryfox.de/actions/checkout@v4
|
|
|
|
- name: Set up JDK
|
|
uses: https://git.oryfox.de/actions/setup-java@v4
|
|
with:
|
|
java-version: 25
|
|
distribution: corretto
|
|
|
|
- name: Set up Maven
|
|
uses: https://git.oryfox.de/actions/setup-maven@v5
|
|
with:
|
|
maven-version: 3.9.14
|
|
|
|
- name: Build with Maven
|
|
run: mvn -B clean package
|
|
|
|
- name: Set release tag to current datetime
|
|
id: datetime
|
|
run: |
|
|
TAG_NAME="$(date -u '+%Y%m%d%H%M%S')"
|
|
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_OUTPUT
|
|
|
|
- name: Create Release
|
|
uses: https://git.oryfox.de/actions/gitea-release-action@v1
|
|
with:
|
|
files: target/inventory-tools.jar
|
|
token: ${{ secrets.REPOSITORY_TOKEN }}
|
|
tag_name: ${{ steps.datetime.outputs.TAG_NAME }}
|
|
name: ${{ steps.datetime.outputs.TAG_NAME }} |