diff --git a/.github/build.sh b/.github/build.sh
new file mode 100755
index 0000000..523abeb
--- /dev/null
+++ b/.github/build.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/main/ci-build.sh
+sh ci-build.sh
diff --git a/.github/setup.sh b/.github/setup.sh
new file mode 100755
index 0000000..a03464b
--- /dev/null
+++ b/.github/setup.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/main/ci-setup-github-actions.sh
+sh ci-setup-github-actions.sh
diff --git a/.github/workflows/build-main.yml b/.github/workflows/build-main.yml
new file mode 100644
index 0000000..f617c30
--- /dev/null
+++ b/.github/workflows/build-main.yml
@@ -0,0 +1,42 @@
+name: build
+
+on:
+ push:
+ branches:
+ - master
+ tags:
+ - "*-[0-9]+.*"
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Cache local Maven repository
+ uses: actions/cache@v2
+ env:
+ cache-name: cache-m2
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-build-${{ env.cache-name }}
+ restore-keys: |
+ ${{ runner.os }}-build-${{ env.cache-name }}-
+ ${{ runner.os }}-build-
+ ${{ runner.os }}-
+ - name: Set up Java
+ uses: actions/setup-java@v2
+ with:
+ java-version: '8'
+ distribution: 'zulu'
+ - name: Set up CI environment
+ run: .github/setup.sh
+ - name: Execute the build
+ run: .github/build.sh
+ env:
+ GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }}
+ GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
+ MAVEN_USER: ${{ secrets.MAVEN_USER }}
+ MAVEN_PASS: ${{ secrets.MAVEN_PASS }}
+ OSSRH_PASS: ${{ secrets.OSSRH_PASS }}
+ SIGNING_ASC: ${{ secrets.SIGNING_ASC }}
diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml
new file mode 100644
index 0000000..98743d5
--- /dev/null
+++ b/.github/workflows/build-pr.yml
@@ -0,0 +1,33 @@
+name: build PR
+
+on:
+ pull_request:
+ branches:
+ - master
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Cache local Maven repository
+ uses: actions/cache@v2
+ env:
+ cache-name: cache-m2
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-build-${{ env.cache-name }}
+ restore-keys: |
+ ${{ runner.os }}-build-${{ env.cache-name }}-
+ ${{ runner.os }}-build-
+ ${{ runner.os }}-
+ - name: Set up Java
+ uses: actions/setup-java@v2
+ with:
+ java-version: '8'
+ distribution: 'zulu'
+ - name: Set up CI environment
+ run: .github/setup.sh
+ - name: Execute the build
+ run: .github/build.sh
diff --git a/README.md b/README.md
index fafca35..a6fe3c1 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,5 @@
+[![build](https://github.com/stardist/stardist-imagej/actions/workflows/build-main.yml/badge.svg)](https://github.com/stardist/stardist-imagej/actions/workflows/build-main.yml)
+
# StarDist ImageJ/Fiji Plugin
This is the ImageJ/Fiji plugin for [StarDist](https://github.com/mpicbg-csbd/stardist), which can be used to apply already trained models to new images.
diff --git a/pom.xml b/pom.xml
index 4e4cfb4..c023c0e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -112,6 +112,9 @@
de.csbdresden.stardist.StarDist2D
bsd_3
Uwe Schmidt, Martin Weigert
+
+
+ sign,deploy-to-scijava