Skip to content

Commit 65bc820

Browse files
committed
Add Windows & MacOs Builds to releases
1 parent 32199a9 commit 65bc820

5 files changed

Lines changed: 181 additions & 22 deletions

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# This workflow will build a Java project with Maven
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3+
4+
name: Release MacOS
5+
6+
on:
7+
repository_dispatch:
8+
types: [new-version-event]
9+
10+
jobs:
11+
build:
12+
13+
runs-on: macos-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up JDK 12
18+
uses: actions/setup-java@v1
19+
with:
20+
java-version: 12
21+
- name: Build with Maven
22+
# without -DskipTests, we also run tests, which should prevent
23+
# the package from being packaged if tests fail
24+
run: mvn -B package --file pom.xml -P dist
25+
- name: Upload Release
26+
id: upload_release
27+
if: success()
28+
#uses: actions/upload-release-asset@v1
29+
#env:
30+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
#with:
32+
# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
33+
# asset_path: ./my-artifact.zip
34+
# asset_name: my-artifact.zip
35+
# asset_content_type: application/zip
36+
uses: csexton/release-asset-action@v2
37+
with:
38+
pattern: "target/PreCapture*.(dmg|pkg)"
39+
github-token: ${{ secrets.GITHUB_TOKEN }}
40+
release-url: ${{ github.event.client_payload.release_url }}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# This workflow will build a Java project with Maven
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3+
4+
name: Release Windows
5+
6+
on:
7+
repository_dispatch:
8+
types: [new-version-event]
9+
10+
jobs:
11+
build:
12+
13+
runs-on: windows-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up JDK 12
18+
uses: actions/setup-java@v1
19+
with:
20+
java-version: 12
21+
- name: Build with Maven
22+
# without -DskipTests, we also run tests, which should prevent
23+
# the package from being packaged if tests fail
24+
run: mvn -B package --file pom.xml -P dist
25+
- name: Upload Release
26+
id: upload_release
27+
if: success()
28+
#uses: actions/upload-release-asset@v1
29+
#env:
30+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
#with:
32+
# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
33+
# asset_path: ./my-artifact.zip
34+
# asset_name: my-artifact.zip
35+
# asset_content_type: application/zip
36+
uses: csexton/release-asset-action@v2
37+
with:
38+
pattern: "target/PreCapture*.exe"
39+
github-token: ${{ secrets.GITHUB_TOKEN }}
40+
release-url: ${{ github.event.client_payload.release_url }}

.github/workflows/maven-release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,11 @@ jobs:
5757
pattern: "target/PreCapture*.jar"
5858
github-token: ${{ secrets.GITHUB_TOKEN }}
5959
release-url: ${{ steps.create_release.outputs.upload_url }}
60+
61+
- name: Start Build on Mac & Windows
62+
uses: peter-evans/repository-dispatch@v1
63+
with:
64+
token: ${{ secrets.PERSONAL_REPO_ACCESS_TOKEN }}
65+
repository: BernhardWebstudio/PreCapture
66+
event-type: new-version-event
67+
client-payload: '{ "release_url": "${{ steps.create_release.outputs.upload_url }}" }'

PreCaptureApp.iml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,18 @@
8686
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:jcl-over-slf4j:1.5.6" level="project" />
8787
<orderEntry type="library" name="Maven: org.codehaus.plexus:plexus-utils:1.5.6" level="project" />
8888
<orderEntry type="library" name="Maven: javax.transaction:jta:1.1" level="project" />
89-
<orderEntry type="library" name="Maven: org.glassfish.jaxb:jaxb-runtime:3.0.0-M4" level="project" />
90-
<orderEntry type="library" name="Maven: org.glassfish.jaxb:jaxb-core:3.0.0-M4" level="project" />
91-
<orderEntry type="library" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:3.0.0-RC3" level="project" />
92-
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.activation:jakarta.activation:2.0.0-RC3" level="project" />
93-
<orderEntry type="library" name="Maven: org.glassfish.jaxb:txw2:3.0.0-M4" level="project" />
94-
<orderEntry type="library" name="Maven: com.sun.istack:istack-commons-runtime:4.0.0-M3" level="project" />
89+
<orderEntry type="library" name="Maven: org.glassfish.jaxb:jaxb-runtime:2.3.2" level="project" />
90+
<orderEntry type="library" name="Maven: org.glassfish.jaxb:txw2:2.3.2" level="project" />
91+
<orderEntry type="library" name="Maven: com.sun.istack:istack-commons-runtime:3.0.8" level="project" />
92+
<orderEntry type="library" name="Maven: org.jvnet.staxex:stax-ex:1.8.1" level="project" />
93+
<orderEntry type="library" name="Maven: com.sun.xml.fastinfoset:FastInfoset:1.2.16" level="project" />
94+
<orderEntry type="library" name="Maven: jakarta.activation:jakarta.activation-api:1.2.1" level="project" />
9595
<orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
9696
<orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
97+
<orderEntry type="library" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.2" level="project" />
98+
<orderEntry type="library" name="Maven: com.sun.activation:jakarta.activation:2.0.0-RC3" level="project" />
9799
<orderEntry type="library" name="Maven: javassist:javassist:3.12.1.GA" level="project" />
100+
<orderEntry type="library" name="Maven: javax.activation:activation:1.1.1" level="project" />
98101
<orderEntry type="library" name="Maven: junit:junit:4.13" level="project" />
99102
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
100103
<orderEntry type="library" name="Maven: com.google.zxing:core:3.4.0" level="project" />
@@ -117,6 +120,7 @@
117120
<orderEntry type="library" name="Maven: javax.help:javahelp:2.0.05" level="project" />
118121
<orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-core:2.3.0.1" level="project" />
119122
<orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-impl:2.3.1" level="project" />
123+
<orderEntry type="library" name="Maven: com.sun.activation:javax.activation:1.2.0" level="project" />
120124
<orderEntry type="library" name="Maven: org.javassist:javassist:3.25.0-GA" level="project" />
121125
<orderEntry type="library" name="Maven: org.apache.pdfbox:pdfbox:2.0.20" level="project" />
122126
<orderEntry type="library" name="Maven: org.apache.pdfbox:fontbox:2.0.20" level="project" />

pom.xml

Lines changed: 83 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
<?xml version="1.0" encoding="UTF-8" ?>
1+
<?xml version="1.0" encoding="UTF-8"?>
22
<project xmlns="http://maven.apache.org/POM/4.0.0"
33
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">
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>MCZDataShot</groupId>
66
<artifactId>PreCaptureApp</artifactId>
77
<version>1.2.0-SNAPSHOT</version>
8+
<packaging>jar</packaging>
89
<name>precapture</name>
910
<description>MCZ DataShot Collection Precapture Label Application</description>
10-
<packaging>jar</packaging>
1111
<properties>
1212
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1313
</properties>
@@ -64,11 +64,32 @@
6464
<artifactId>jaxb-api</artifactId>
6565
<version>2.3.1</version>
6666
</dependency>
67+
<!-- API, java.xml.bind module -->
68+
<dependency>
69+
<groupId>jakarta.xml.bind</groupId>
70+
<artifactId>jakarta.xml.bind-api</artifactId>
71+
<version>2.3.2</version>
72+
</dependency>
73+
<dependency>
74+
<groupId>com.sun.activation</groupId>
75+
<artifactId>jakarta.activation</artifactId>
76+
<version>2.0.0-RC3</version>
77+
</dependency>
78+
<dependency>
79+
<groupId>com.sun.activation</groupId>
80+
<artifactId>javax.activation</artifactId>
81+
<version>1.2.0</version>
82+
</dependency>
6783
<dependency>
6884
<groupId>javassist</groupId>
6985
<artifactId>javassist</artifactId>
7086
<version>3.12.1.GA</version>
7187
</dependency>
88+
<dependency>
89+
<groupId>javax.activation</groupId>
90+
<artifactId>activation</artifactId>
91+
<version>1.1.1</version>
92+
</dependency>
7293
<dependency>
7394
<groupId>junit</groupId>
7495
<artifactId>junit</artifactId>
@@ -125,15 +146,21 @@
125146
<artifactId>javahelp</artifactId>
126147
<version>2.0.05</version>
127148
</dependency>
128-
<dependency>
149+
<!-- <dependency>
129150
<groupId>com.sun.xml.bind</groupId>
130151
<artifactId>jaxb-core</artifactId>
131152
<version>2.3.0.1</version>
132-
</dependency>
133-
<dependency>
153+
</dependency> -->
154+
<!-- <dependency>
134155
<groupId>com.sun.xml.bind</groupId>
135156
<artifactId>jaxb-impl</artifactId>
136157
<version>2.3.1</version>
158+
</dependency> -->
159+
<!-- https://mvnrepository.com/artifact/com.sun.activation/javax.activation -->
160+
<dependency>
161+
<groupId>com.sun.activation</groupId>
162+
<artifactId>javax.activation</artifactId>
163+
<version>1.2.0</version>
137164
</dependency>
138165
<dependency>
139166
<groupId>org.javassist</groupId>
@@ -146,23 +173,20 @@
146173
<artifactId>pdfbox</artifactId>
147174
<version>2.0.20</version>
148175
</dependency>
176+
<!-- Runtime, com.sun.xml.bind module -->
177+
<dependency>
178+
<groupId>org.glassfish.jaxb</groupId>
179+
<artifactId>jaxb-runtime</artifactId>
180+
<version>2.3.2</version>
181+
</dependency>
149182
</dependencies>
150183
<build>
151184
<sourceDirectory>${project.basedir}/src</sourceDirectory>
152185
<testSourceDirectory>${project.basedir}/src</testSourceDirectory>
153-
<testResources>
154-
<testResource>
155-
<directory>${project.basedir}/src</directory>
156-
<includes>
157-
<include>**/*.xml</include>
158-
</includes>
159-
</testResource>
160-
</testResources>
161186
<resources>
162187
<resource>
163-
<directory
164-
>${project.basedir}/src/edu/harvard/mcz/precapture/resources</directory>
165188
<targetPath>edu/harvard/mcz/precapture/resources</targetPath>
189+
<directory>${project.basedir}/src/edu/harvard/mcz/precapture/resources</directory>
166190
<includes>
167191
<include>**/**</include>
168192
</includes>
@@ -183,7 +207,28 @@
183207
</includes>
184208
</resource>
185209
</resources>
210+
<testResources>
211+
<testResource>
212+
<directory>${project.basedir}/src</directory>
213+
<includes>
214+
<include>**/*.xml</include>
215+
</includes>
216+
</testResource>
217+
</testResources>
186218
<plugins>
219+
<plugin>
220+
<groupId>com.github.ekryd.sortpom</groupId>
221+
<artifactId>sortpom-maven-plugin</artifactId>
222+
<version>2.11.0</version>
223+
<executions>
224+
<execution>
225+
<goals>
226+
<goal>sort</goal>
227+
</goals>
228+
<phase>verify</phase>
229+
</execution>
230+
</executions>
231+
</plugin>
187232
<plugin>
188233
<groupId>org.apache.maven.plugins</groupId>
189234
<artifactId>maven-compiler-plugin</artifactId>
@@ -209,10 +254,32 @@
209254
<executions>
210255
<execution>
211256
<id>make-assembly</id>
212-
<phase>package</phase>
213257
<goals>
214258
<goal>single</goal>
215259
</goals>
260+
<phase>package</phase>
261+
</execution>
262+
</executions>
263+
</plugin>
264+
<plugin>
265+
<groupId>io.github.fvarrui</groupId>
266+
<artifactId>javapackager</artifactId>
267+
<version>1.4.1</version>
268+
<executions>
269+
<execution>
270+
<goals>
271+
<goal>package</goal>
272+
</goals>
273+
<phase>package</phase>
274+
<configuration>
275+
<!-- mandatory -->
276+
<mainClass>edu.harvard.mcz.precapture.PreCaptureApp</mainClass>
277+
<!-- optional -->
278+
<bundleJre>true</bundleJre>
279+
<generateInstaller>true</generateInstaller>
280+
<administratorRequired>false</administratorRequired>
281+
<platform>auto</platform>
282+
</configuration>
216283
</execution>
217284
</executions>
218285
</plugin>

0 commit comments

Comments
 (0)