diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..870f2bb
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,62 @@
+name: Build
+
+on:
+ push:
+ branches: '**'
+ paths:
+ - 'src/**'
+ - 'pom.xml'
+ pull_request:
+ branches: '**'
+ paths:
+ - 'src/**'
+ - 'pom.xml'
+ workflow_dispatch:
+
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout Repository
+ uses: actions/checkout@v3
+
+ - name: Setup Java
+ uses: actions/setup-java@v3
+ with:
+ distribution: 'temurin'
+ java-version: '11'
+ cache: 'maven'
+
+ - name: Build
+ run: mvn -B -DskipTests clean package
+
+ - name: Test
+ run: mvn test
+
+ - name: Upload Coverage to Codecov
+ uses: codecov/codecov-action@v3
+ with:
+ token: ${{ secrets.CODECOV_TOKEN }}
+ directory: ./target/site/jacoco
+ files: jacoco.xml
+ fail_ci_if_error: false
+
+ - name: Retrieve Name & Version
+ run: |
+ echo "VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
+ echo "NAME=$(mvn help:evaluate -Dexpression=project.name -q -DforceStdout)" >> $GITHUB_ENV
+
+ - name: Archive Jar
+ uses: actions/upload-artifact@v3
+ with:
+ path: ./target/${{ env.NAME }}-${{ env.VERSION }}.jar
+
+ - name: Archive Javadoc
+ uses: actions/upload-artifact@v3
+ with:
+ path: ./target/${{ env.NAME }}-${{ env.VERSION }}-javadoc.jar
+
+ - name: Archive Sources
+ uses: actions/upload-artifact@v3
+ with:
+ path: ./target/${{ env.NAME }}-${{ env.VERSION }}-sources.jar
\ No newline at end of file
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
new file mode 100644
index 0000000..add819b
--- /dev/null
+++ b/.github/workflows/deploy.yml
@@ -0,0 +1,72 @@
+name: Deploy
+
+on:
+ push:
+ tags:
+ - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
+ workflow_dispatch:
+
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout Repository
+ uses: actions/checkout@v3
+
+ - name: Setup Java
+ uses: actions/setup-java@v3
+ with:
+ distribution: 'temurin'
+ java-version: '11'
+ cache: 'maven'
+ server-id: ossrh
+ server-username: sgoudham
+ server-password: ${{ secrets.OSSRH_PASSWORD }}
+ gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
+ gpg-passphrase: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
+
+ - name: Build
+ run: mvn -B -DskipTests clean package
+
+ - name: Upload Coverage to Codecov
+ uses: codecov/codecov-action@v3
+ with:
+ token: ${{ secrets.CODECOV_TOKEN }}
+ directory: ./target/site/jacoco
+ files: jacoco.xml
+ fail_ci_if_error: false
+
+ - name: Deploy
+ env:
+ OSSRH_USERNAME: sgoudham
+ OSSRH_TOKEN: ${{ secrets.OSSRH_PASSWORD }}
+ MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
+ run: mvn -B -DskipTests deploy
+
+ - name: Get Name & Version
+ run: |
+ echo "VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
+ echo "NAME=$(mvn help:evaluate -Dexpression=project.name -q -DforceStdout)" >> $GITHUB_ENV
+
+ - name: Archive Jar
+ uses: actions/upload-artifact@v3
+ with:
+ path: ./target/${{ env.NAME }}-${{ env.VERSION }}.jar
+
+ - name: Archive Javadoc
+ uses: actions/upload-artifact@v3
+ with:
+ path: ./target/${{ env.NAME }}-${{ env.VERSION }}-javadoc.jar
+
+ - name: Archive Sources
+ uses: actions/upload-artifact@v3
+ with:
+ path: ./target/${{ env.NAME }}-${{ env.VERSION }}-sources.jar
+
+ - name: Create Release
+ uses: ncipollo/release-action@v1
+ with:
+ artifacts: target/*.jar
+ generateReleaseNotes: true
+ makeLatest: true
+ draft: true
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
deleted file mode 100644
index 2505cc0..0000000
--- a/Dockerfile
+++ /dev/null
@@ -1,9 +0,0 @@
-FROM maven:3.8.1-adoptopenjdk-11
-MAINTAINER Goudham Suresh
-
-RUN apt-get update && apt-get install -y \
- gpg \
- xvfb \
- libxrender1 libxtst6 libxi6 libxext6
-RUN /usr/bin/Xvfb :99 &
-RUN export DISPLAY=:99
\ No newline at end of file
diff --git a/Jenkinsfile b/Jenkinsfile
deleted file mode 100644
index 06c7c1c..0000000
--- a/Jenkinsfile
+++ /dev/null
@@ -1,79 +0,0 @@
-pipeline {
- agent {
- dockerfile {
- args '-u root'
- }
- }
-
- environment {
- CODECOV_TOKEN = credentials('ea3e54d7-7f4f-40ed-af70-d8132e1c405b')
-
- GPG_SECRET_KEY = credentials('4dbfd4ed-bba4-44e0-8410-fbce1a9bba73')
- GPG_OWNER_TRUST = credentials('8703bbe8-c099-481f-8337-1dce32d51771')
- }
-
- stages {
- stage("Import GPG Keys") {
- when {
- branch 'release'
- }
- steps {
- sh 'gpg --batch --import $GPG_SECRET_KEY'
- sh 'gpg --import-ownertrust $GPG_OWNER_TRUST'
- }
- }
- stage("Build") {
- steps {
- withCredentials([file(credentialsId: '076a36e8-d448-46fc-af11-7e7181a6cb99', variable: 'MAVEN_SETTINGS')]) {
- sh 'mvn -s $MAVEN_SETTINGS -B -DskipTests clean package'
- }
- }
- }
- stage("Test") {
- steps {
- wrap([$class: 'Xvfb']) {
- sh "mvn test"
- }
- }
- post {
- success {
- echo "Generating Test Report..."
- publishCoverage adapters: [jacocoAdapter('target/site/jacoco/jacoco.xml')]
-
- echo "Sending Report to CodeCov..."
- sh '''#!/bin/bash
- bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN || echo "Codecov did not collect coverage reports"
- '''
- }
- }
- }
- stage("Deploy To OSSRH") {
- when {
- branch 'release'
- }
- steps {
- withCredentials([file(credentialsId: '076a36e8-d448-46fc-af11-7e7181a6cb99', variable: 'MAVEN_SETTINGS')]) {
- sh 'mvn -s $MAVEN_SETTINGS -B -DskipTests clean deploy'
- }
- }
- post {
- success {
- echo "Archiving Artifacts"
- archiveArtifacts artifacts: 'target/*.jar'
- }
- }
- }
- }
-
- post {
- success {
- echo "I'm Feeling Swag!"
- }
- failure {
- echo 'Not Very Swag :('
- }
- cleanup {
- cleanWs()
- }
- }
-}
\ No newline at end of file
diff --git a/README.md b/README.md
index 46519ef..632a1a6 100644
--- a/README.md
+++ b/README.md
@@ -1,18 +1,10 @@
-[license]: https://img.shields.io/github/license/sgoudham/MyClipboard
[maven-central]: https://img.shields.io/maven-central/v/me.goudham/MyClipboard.svg?label=Maven%20Central
-[build-status]: https://goudham.me/jenkins/job/sgoudham/job/MyClipboard/job/release/badge/icon
+[build-status]: https://img.shields.io/github/checks-status/sgoudham/MyClipboard/main
[codecov]: https://codecov.io/gh/sgoudham/MyClipboard/branch/main/graph/badge.svg?token=F4LKql7rIq
-[issues]: https://img.shields.io/github/issues/sgoudham/MyClipboard?label=issues
-[pull-requests]: https://img.shields.io/github/issues-pr/sgoudham/MyClipboard
-[fossa]: https://app.fossa.com/api/projects/git%2Bgithub.com%2Fsgoudham%2FMyClipboard.svg?type=shield
-![fossa]
-![license]
![maven-central]
![build-status]
![codecov]
-![issues]
-![pull-requests]
# MyClipboard
Utility Library to Access and Manipulate the Default System Clipboard
@@ -126,4 +118,4 @@ dependencies {
```
# License
-[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fsgoudham%2FMyClipboard.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fsgoudham%2FMyClipboard?ref=badge_large)
+[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fsgoudham%2FMyClipboard.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fsgoudham%2FMyClipboard?ref=badge_large)
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 15cbb87..34d6367 100644
--- a/pom.xml
+++ b/pom.xml
@@ -56,19 +56,19 @@
org.junit.jupiter
junit-jupiter-api
- 5.7.2
+ 5.9.0
test
org.junit.jupiter
junit-jupiter-params
- 5.7.2
+ 5.9.0
test
org.mockito
mockito-core
- 3.11.2
+ 4.11.0
test
@@ -80,13 +80,13 @@
org.jetbrains
annotations
- 21.0.1
+ 23.1.0
compile
org.slf4j
slf4j-simple
- 2.0.0-alpha2
+ 2.0.5
org.apache.commons
@@ -186,4 +186,4 @@
-
+
\ No newline at end of file