diff --git a/.github/workflows/publish-jars.yaml b/.github/workflows/publish-jars.yaml new file mode 100644 index 0000000..ecde34f --- /dev/null +++ b/.github/workflows/publish-jars.yaml @@ -0,0 +1,22 @@ +name: Publish JAR files to GitHub Packages +on: + release: + types: [created] +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Java + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + - name: Publish package + run: mvn --batch-mode deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..67c4a49 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,33 @@ +name: Create a GitHub release +on: + push: + tags: + - "v[0-9]+.[0-9]+.[0-9]+" + branches: + - "ci/create-releases" +jobs: + maven: + name: Maven + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Java + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + - name: Build and test + run: | + sudo apt install softhsm2 + SLOT_ID=$(softhsm2-util --init-token --free --label "test" --pin 1234 --so-pin 1234 | tail -n 1 | awk '{ print $NF }') + export JACKNJI11_TEST_TESTSLOT="$SLOT_ID" + export JACKNJI11_TEST_INITSLOT="$SLOT_ID" + export JACKNJI11_TEST_USER_PIN=1234 + export JACKNJI11_TEST_SO_PIN=1234 + export JACKNJI11_PKCS11_LIB_PATH=/usr/lib/x86_64-linux-gnu/softhsm/libsofthsm2.so + mvn --no-transfer-progress package + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: target/*.jar \ No newline at end of file diff --git a/build.xml b/build.xml deleted file mode 100644 index d948f5e..0000000 --- a/build.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pom.xml b/pom.xml index 6c09750..ca0ccee 100644 --- a/pom.xml +++ b/pom.xml @@ -1,21 +1,25 @@ - 4.0.0 - org.pkcs11 + com.keyfactor jacknji11 - 1.3-SNAPSHOT + 1.3.0 jacknji11 jar - + + + UTF-8 + 11 + 11 + + 2010 - - Java Native Interface for PKCS#11 - - https://github.com/joelhockey/jacknji11 + Java Native Interface for PKCS#11 + + https://github.com/Keyfactor/jacknji11 @@ -30,25 +34,56 @@ joel.hockey@gmail.com https://github.com/joelhockey/jacknji11 + + + Keyfactor + support@keyfactor.com + https://keyfactor.com + - - scm:git:https://github.com/joelhockey/jacknji11.git - scm:git:git@github.com:joelhockey/jacknji11.git - https://github.com/joelhockey/jacknji11 - + + + github + GitHub Packages + https://maven.pkg.github.com/keyfactor/jacknji11 + + org.apache.maven.plugins - maven-compiler-plugin - 2.0.2 + maven-surefire-plugin + 3.0.0 - 1.8 - 1.8 + 3 + false + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + false + + + + + org.apache.maven.plugins + maven-source-plugin + 3.2.0 + + + attach-sources + + jar + + + + @@ -63,8 +98,6 @@ jnr-ffi 0.6.0 - - commons-logging commons-logging @@ -72,7 +105,6 @@ provided - junit junit