File tree Expand file tree Collapse file tree 5 files changed +114
-0
lines changed
src/main/java/com/floortech Expand file tree Collapse file tree 5 files changed +114
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Release Maven JAR
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*.*.*"
7+
8+ jobs :
9+ release :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v4
15+
16+ - name : Set up Java
17+ uses : actions/setup-java@v4
18+ with :
19+ distribution : " temurin"
20+ java-version : " 17"
21+
22+ - name : Build fat JAR
23+ run : mvn clean package
24+
25+ - name : Find and rename fat JAR
26+ run : |
27+ mkdir -p dist
28+ FAT_JAR=$(find target -name "*-ready.jar" | head -n 1)
29+ VERSION=${GITHUB_REF_NAME#v}
30+ cp "$FAT_JAR" "dist/FloorIDE-$VERSION.jar"
31+
32+ - name : Create GitHub Release
33+ uses : softprops/action-gh-release@v2
34+ with :
35+ tag_name : ${{ github.ref_name }}
36+ files : dist/*.jar
37+ env :
38+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1+ {
2+ "java.configuration.updateBuildConfiguration" : " automatic"
3+ }
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <project xmlns =" http://maven.apache.org/POM/4.0.0"
3+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4+ xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
5+ <modelVersion >4.0.0</modelVersion >
6+
7+ <groupId >com.floortech</groupId >
8+ <artifactId >flooride</artifactId >
9+ <version >1.0.0</version >
10+ <packaging >jar</packaging >
11+
12+ <name >FloorIDE</name >
13+ <description >FloorTech's own shell-based IDE </description >
14+ <url >https://github.com/FloorTech/FloorIDE</url >
15+
16+ <properties >
17+ <maven .compiler.source>21</maven .compiler.source>
18+ <maven .compiler.target>21</maven .compiler.target>
19+ <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
20+ </properties >
21+
22+ <dependencies ></dependencies >
23+
24+ <build >
25+ <plugins >
26+ <plugin >
27+ <groupId >org.apache.maven.plugins</groupId >
28+ <artifactId >maven-assembly-plugin</artifactId >
29+ <configuration >
30+ <descriptorRefs >
31+ <descriptorRef >ready</descriptorRef >
32+ </descriptorRefs >
33+ <archive >
34+ <manifest >
35+ <mainClass >com.floortech.flooride.Main</mainClass >
36+ </manifest >
37+ </archive >
38+ </configuration >
39+ <executions >
40+ <execution >
41+ <phase >package</phase >
42+ <goals >
43+ <goal >single</goal >
44+ </goals >
45+ </execution >
46+ </executions >
47+ </plugin >
48+ </plugins >
49+ </build >
50+ </project >
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+
4+ VERSION=$( grep -m 1 " <version>" pom.xml | sed -E " s/.*<version>(.+)<\/version>.*/\1/" )
5+ TAG=" v$VERSION "
6+
7+ if git rev-parse " $TAG " > /dev/null 2>&1 ; then
8+ echo " ❌ Tag $TAG already exists. Bump the version in pom.xml first."
9+ exit 1
10+ fi
11+
12+ git tag " $TAG "
13+ git push origin " $VERSION "
14+
15+ echo " ✅ Tagged and pushed FloorIDE version $VERSION "
16+ echo " 🚀 GitHub Actions will now build and release the app"
Original file line number Diff line number Diff line change 1+ package com .floortech ;
2+
3+ public class Main {
4+ public static void main (String [] args ) {
5+ System .out .println ("Hello world!" );
6+ }
7+ }
You can’t perform that action at this time.
0 commit comments