summaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/ci.yml')
-rw-r--r--.github/workflows/ci.yml58
1 files changed, 58 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..eaee101
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,58 @@
+name: CI
+
+on:
+ push:
+ branches: [ 'master' ]
+ pull_request:
+ branches: [ 'master' ]
+ release:
+ types: [ 'created' ]
+
+permissions:
+ contents: read
+
+jobs:
+ tests:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-java@v4
+ with:
+ java-version: '11'
+ distribution: 'temurin'
+ - name: Fetch Onkostar-API
+ run: |
+ curl -L --user dnpm:${{ secrets.PACKAGE_TOKEN }} \
+ https://git.dnpm.dev/api/packages/Plugin-JF-Onkostar/generic/onkostar-api/2.14.2/onkostar-api-2.14.2.jar \
+ --output ${{ github.workspace }}/libs/onkostar-api-2.14.2.jar
+ - name: Execute tests
+ run: mvn --batch-mode verify
+ build:
+ runs-on: ubuntu-latest
+ needs:
+ - tests
+ permissions:
+ contents: write
+ defaults:
+ run:
+ shell: bash
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-java@v4
+ with:
+ java-version: '11'
+ distribution: 'temurin'
+ - name: Fetch Onkostar-API
+ run: |
+ curl -L --user dnpm:${{ secrets.PACKAGE_TOKEN }} \
+ https://git.dnpm.dev/api/packages/Plugin-JF-Onkostar/generic/onkostar-api/2.14.2/onkostar-api-2.14.2.jar \
+ --output ${{ github.workspace }}/libs/onkostar-api-2.14.2.jar
+ - name: Maven package build
+ run: mvn --batch-mode package
+ - name: Release
+ if: ${{ github.event_name == 'release' && github.event.action == 'created' }}
+ uses: softprops/action-gh-release@v2
+ with:
+ files: |
+ target/*.jar
+ forms/dnpm-formulare.osc