Skip to content

Commit

Permalink
Create create_library_zip.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
micycle1 authored Jan 11, 2025
1 parent 3ce834e commit 5ece716
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/create_library_zip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
on:
push:
tags:
- '*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven

- name: Build with Maven
run: mvn -B -Puber-jar verify -DfatJarName=GeometrySuiteForProcessing

- name: Extract POM version
id: pom_version
run: |
VERSION=$(mvn -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive exec:exec)
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Extracted Maven Version: $VERSION"
- name: Create Release zip
run: |
mkdir -p GeometrySuiteForProcessing/library
cp target/GeometrySuiteForProcessing.jar GeometrySuiteForProcessing/library/
mkdir GeometrySuiteForProcessing/reference
cp -r target/reports/apidocs GeometrySuiteForProcessing/reference
mkdir GeometrySuiteForProcessing/examples
cp -r examples/* GeometrySuiteForProcessing/examples
mkdir GeometrySuiteForProcessing/src
cp -r src/* GeometrySuiteForProcessing/src
cp library.properties GeometrySuiteForProcessing
zip -r GeometrySuiteForProcessing.zip GeometrySuiteForProcessing
cp library.properties GeometrySuiteForProcessing.txt # Copy and rename library.properties
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
GeometrySuiteForProcessing.zip
GeometrySuiteForProcessing.txt
name: PGS Latest [${{ steps.pom_version.outputs.version }}]
body: This tag hosts the latest release of PGS, and is used to provide PGS as a library via the Processing contribution manager.
make_latest: false
tag_name: latest

0 comments on commit 5ece716

Please sign in to comment.