From 925a3dd7fd70f27a4e454c7d6c45e2fc3842204b Mon Sep 17 00:00:00 2001 From: Semih Kaiser Date: Fri, 13 Feb 2026 21:39:24 +0100 Subject: [PATCH] Add CI --- .github/workflows/build.yml | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..a450ab0 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,42 @@ +name: Build & Release + +on: + push: + branches: + - master + +permissions: + contents: write + +jobs: + build-and-release: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up JDK + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 25 + cache: maven + + - name: Build with Maven + run: mvn -B clean package + + - name: Set release tag to current datetime + id: datetime + run: | + TAG_NAME="release-$(date -u '+%Y%m%d%H%M%S')" + echo "TAG_NAME=$TAG_NAME" >> $GITHUB_OUTPUT + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ steps.datetime.outputs.TAG_NAME }} + name: Release ${{ steps.datetime.outputs.TAG_NAME }} + files: target/inventory-tools.jar + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}