Skip to content

Commit 5ece716

Browse files
authored
Create create_library_zip.yml
1 parent 3ce834e commit 5ece716

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed
+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
on:
2+
push:
3+
tags:
4+
- '*'
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
12+
- name: Set up JDK 17
13+
uses: actions/setup-java@v4
14+
with:
15+
java-version: '17'
16+
distribution: 'temurin'
17+
cache: maven
18+
19+
- name: Build with Maven
20+
run: mvn -B -Puber-jar verify -DfatJarName=GeometrySuiteForProcessing
21+
22+
- name: Extract POM version
23+
id: pom_version
24+
run: |
25+
VERSION=$(mvn -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive exec:exec)
26+
echo "version=$VERSION" >> $GITHUB_OUTPUT
27+
echo "Extracted Maven Version: $VERSION"
28+
29+
- name: Create Release zip
30+
run: |
31+
mkdir -p GeometrySuiteForProcessing/library
32+
cp target/GeometrySuiteForProcessing.jar GeometrySuiteForProcessing/library/
33+
mkdir GeometrySuiteForProcessing/reference
34+
cp -r target/reports/apidocs GeometrySuiteForProcessing/reference
35+
mkdir GeometrySuiteForProcessing/examples
36+
cp -r examples/* GeometrySuiteForProcessing/examples
37+
mkdir GeometrySuiteForProcessing/src
38+
cp -r src/* GeometrySuiteForProcessing/src
39+
cp library.properties GeometrySuiteForProcessing
40+
zip -r GeometrySuiteForProcessing.zip GeometrySuiteForProcessing
41+
42+
cp library.properties GeometrySuiteForProcessing.txt # Copy and rename library.properties
43+
44+
- name: Release
45+
uses: softprops/action-gh-release@v2
46+
with:
47+
files: |
48+
GeometrySuiteForProcessing.zip
49+
GeometrySuiteForProcessing.txt
50+
name: PGS Latest [${{ steps.pom_version.outputs.version }}]
51+
body: This tag hosts the latest release of PGS, and is used to provide PGS as a library via the Processing contribution manager.
52+
make_latest: false
53+
tag_name: latest

0 commit comments

Comments
 (0)