From a710648d90ad7ef78321fe6e627a879362085e3e Mon Sep 17 00:00:00 2001 From: Curtis Rueden Date: Thu, 22 Jun 2023 17:02:09 -0500 Subject: [PATCH] Add GitHub Actions CI configuration --- .github/build.sh | 3 +++ .github/setup.sh | 7 ++++++ .github/workflows/build.yml | 43 +++++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100755 .github/build.sh create mode 100755 .github/setup.sh create mode 100644 .github/workflows/build.yml 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..550c50b --- /dev/null +++ b/.github/setup.sh @@ -0,0 +1,7 @@ +#!/bin/sh +curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/main/ci-setup-github-actions.sh +sh ci-setup-github-actions.sh + +# Install latest development version of appose-python. +echo "==> Installing appose-python..." +python -m pip install git+https://github.com/apposed/appose-python.git#egg=appose diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..b005b9c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,43 @@ +name: build + +on: + pull_request: + branches: + - main + push: + branches: + - main + tags: + - "*-[0-9]+.*" + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Java + uses: actions/setup-java@v3 + with: + java-version: '8' + distribution: 'zulu' + cache: 'maven' + + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.10' + + - 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 }}