Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: CI

on:
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Build and test
run: mvn clean verify
39 changes: 39 additions & 0 deletions .github/workflows/jdeploy-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: jDeploy npm Publish

on:
push:
branches:
- '*-snapshot'
tags:
- 'v*'

concurrency:
group: jdeploy-npm-${{ github.repository }}
cancel-in-progress: false

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
- name: Build with Maven
run: mvn clean package -DskipTests
- name: Install jDeploy
run: npm install -g jdeploy
- name: Package with jDeploy
run: jdeploy package
- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
65 changes: 65 additions & 0 deletions .github/workflows/jdeploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: jDeploy CI

on:
push:
branches:
- '*-snapshot'
tags:
- 'v*'

concurrency:
group: jdeploy-release-${{ github.repository }}
cancel-in-progress: false

jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Build with Maven
run: mvn clean package -DskipTests
- name: Build App Installer Bundles
uses: shannah/jdeploy@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Build Artifacts for DMG Action
if: ${{ vars.JDEPLOY_CREATE_DMG == 'true' }}
uses: actions/upload-artifact@v4
with:
name: build-target
path: ./target

create_and_upload_dmg:
if: ${{ vars.JDEPLOY_CREATE_DMG == 'true' }}
name: Create and upload DMG
permissions:
contents: write
runs-on: macos-latest
needs: build
steps:
- name: Set up Git
run: |
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git config --global user.name "${{ github.actor }}"
- uses: actions/checkout@v3
- name: Download Build Artifacts
uses: actions/download-artifact@v4
with:
name: build-target
path: ./target
- name: Create DMG and Upload to Release
uses: shannah/jdeploy-action-dmg@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
developer_id: ${{ secrets.MAC_DEVELOPER_ID }}
developer_certificate_p12_base64: ${{ secrets.MAC_DEVELOPER_CERTIFICATE_P12_BASE64 }}
developer_certificate_password: ${{ secrets.MAC_DEVELOPER_CERTIFICATE_PASSWORD }}
notarization_password: ${{ secrets.MAC_NOTARIZATION_PASSWORD }}
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
target/
*.class
*.jar
*.log
.idea/
*.iml
.settings/
.project
.classpath
jdeploy-bundle/
jdeploy/
node_modules/
32 changes: 32 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "install-skill-cli",
"version": "1.0.6",
"description": "CLI tool for installing skills deployed with the skills-jar-maven-plugin",
"bin": {
"install-skill": "jdeploy-bundle/jdeploy.js"
},
"preferGlobal": true,
"jdeploy": {
"jdk": false,
"javaVersion": "11",
"javafx": false,
"jar": "target/install-skill-cli-1.0.0-SNAPSHOT.jar",
"title": "Install Skill CLI",
"commands": {
"install-skill": {
"description": "Install skills deployed with the skills-jar-maven-plugin"
}
}
},
"dependencies": {
"command-exists-promise": "^2.0.2",
"node-fetch": "2.6.7",
"tar": "^4.4.8",
"yauzl": "^2.10.0",
"shelljs": "^0.8.4"
},
"files": [
"jdeploy-bundle"
],
"license": "ISC"
}
141 changes: 141 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>ca.weblite</groupId>
<artifactId>install-skill-cli</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Install Skill CLI</name>
<description>CLI tool for installing skills deployed with the skills-jar-maven-plugin</description>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>11</maven.compiler.release>
<picocli.version>4.7.5</picocli.version>
<junit.version>5.10.2</junit.version>
</properties>

<dependencies>
<dependency>
<groupId>info.picocli</groupId>
<artifactId>picocli</artifactId>
<version>${picocli.version}</version>
</dependency>

<!-- Maven Embedder - runs Maven in-process -->
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-embedder</artifactId>
<version>3.9.9</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-compat</artifactId>
<version>3.9.9</version>
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-connector-basic</artifactId>
<version>1.9.22</version>
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-transport-http</artifactId>
<version>1.9.22</version>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-http</artifactId>
<version>3.5.3</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.36</version>
</dependency>

<!-- Test dependencies -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>info.picocli</groupId>
<artifactId>picocli-codegen</artifactId>
<version>${picocli.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.2.5</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>ca.weblite.installskill.InstallSkillCommand</mainClass>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
<transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer"/>
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/sisu/javax.inject.Named</resource>
</transformer>
</transformers>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading
Loading