From 99158734e8454717c392d12ff4fb4724ba2ced9d Mon Sep 17 00:00:00 2001 From: Semih Kaiser Date: Thu, 26 Mar 2026 09:11:35 +0100 Subject: [PATCH] Add Gitea CI --- .gitea/workflows/build.yml | 42 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..5633bae --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,42 @@ +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 }} \ No newline at end of file