File tree Expand file tree Collapse file tree 2 files changed +50
-1
lines changed
Expand file tree Collapse file tree 2 files changed +50
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Release to GitHub
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ permissions :
8+ contents : write
9+
10+ jobs :
11+ build-and-release :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Checkout code
15+ uses : actions/checkout@v4
16+
17+ - name : Set up JDK 11
18+ uses : actions/setup-java@v4
19+ with :
20+ java-version : ' 11'
21+ distribution : ' temurin'
22+
23+ - name : Extract version from tag
24+ id : vars
25+ run : |
26+ TAG_NAME=${GITHUB_REF##*/}
27+ if [[ ! "$TAG_NAME" =~ ^v[0-9]+(\.[0-9]+)*$ ]]; then
28+ echo "Invalid tag format: $TAG_NAME"
29+ exit 1
30+ fi
31+ VERSION=${TAG_NAME#v}
32+ echo "tag=$TAG_NAME" >> "$GITHUB_OUTPUT"
33+ echo "version=$VERSION" >> "$GITHUB_OUTPUT"
34+
35+ - name : Build JAR
36+ run : mvn -B clean package -DskipTests=true -Drevision=${{ steps.vars.outputs.version }}
37+
38+ - name : Upload JAR to GitHub Release
39+ uses : softprops/action-gh-release@v2
40+ with :
41+ files : target/owlapi-wrapper-${{ steps.vars.outputs.version }}.jar
42+ generate_release_notes : true
43+ env :
44+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
45+
Original file line number Diff line number Diff line change 33
44 <groupId >org.stanford.ncbo.oapiwrapper</groupId >
55 <artifactId >owlapi-wrapper</artifactId >
6- <version >1.4.3-SNAPSHOT </version >
6+ <version >${revision} </version >
77 <packaging >jar</packaging >
88
99 <name >owlapi_wrapper</name >
9999 </issueManagement >
100100
101101 <properties >
102+ <revision >1.4.3-SNAPSHOT</revision >
102103 <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
103104 </properties >
104105
217218 </executions >
218219 </plugin >
219220
221+ <!-- Commented out: we use Git tag–driven releases instead -->
222+ <!--
220223 <plugin>
221224 <groupId>org.apache.maven.plugins</groupId>
222225 <artifactId>maven-release-plugin</artifactId>
223226 <version>2.5.3</version>
224227 </plugin>
228+ -->
225229
226230 <plugin >
227231 <groupId >org.jacoco</groupId >
You can’t perform that action at this time.
0 commit comments