From 6f29b27bc71a06bbc334625f2ce397c0fd72c740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brage=20Skj=C3=B8nborg?= Date: Sun, 11 Oct 2026 20:04:54 +0200 Subject: [PATCH] CI --- .github/workflows/ci.yml | 24 ++++++++++++++++++++++++ .github/workflows/publish.yml | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..364eb24 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,24 @@ +name: CI + +on: + push: + branches: ['**'] + pull_request: + workflow_dispatch: + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '21' + - name: Run tests and build artifacts + run: ./gradlew --no-daemon clean test build diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..24a92e5 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,35 @@ +name: Build and publish release to Reposilite + +on: + release: + types: [created] + +permissions: + contents: read + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + distribution: zulu + java-version: '21' + + - name: Set up Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Make Gradle wrapper executable + run: chmod +x ./gradlew + + - name: Test and publish release + run: ./gradlew --no-daemon clean test publish + env: + RELEASE_VERSION: ${{ github.event.release.tag_name }} + reposiliteUsername: ${{ secrets.reposiliteUsername }} + reposilitePassword: ${{ secrets.reposilitePassword }}