Skip to content

Commit 1cec7b1

Browse files
committed
Add pom and github workflow for auto releases
Signed-off-by: Taylor Smock <[email protected]>
1 parent 8533864 commit 1cec7b1

File tree

3 files changed

+120
-18
lines changed

3 files changed

+120
-18
lines changed

.github/workflows/ant.yml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Java CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- $default-branch
8+
- $protected-branches
9+
pull_request:
10+
branches:
11+
- master
12+
- $default-branch
13+
workflow_dispatch:
14+
15+
permissions:
16+
id-token: write
17+
attestations: write
18+
contents: write
19+
packages: write
20+
checks: write
21+
22+
jobs:
23+
check-release-needed:
24+
runs-on: ubuntu-latest
25+
outputs:
26+
release_needed: ${{ steps.create_release_needed.outputs.release_needed }}
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: ${{ (github.repository == 'JOSM/rex' && github.ref_type == 'branch' && github.ref_name == 'master' && github.event_name != 'schedule' && github.event_name != 'pull_request') && '0' || '1' }}
32+
33+
- name: Set release needed
34+
id: create_release_needed
35+
run: |
36+
last_tag=$(git describe --tags --abbrev=0 --always)
37+
release_needed="false"
38+
for file in $(git diff ${last_tag}..HEAD --name-only); do
39+
if [[ $file = "src/"* ]] || [[ $file = "data/*" ]] || [[ $file = "lib/*" ]] || [[ $file = "resources/*" ]] || [[ $file = "images/*" ]]; then
40+
release_needed="true"
41+
break
42+
fi
43+
done
44+
echo "release_needed=$release_needed" >> $GITHUB_OUTPUT
45+
46+
call-workflow:
47+
needs: check-release-needed
48+
strategy:
49+
matrix:
50+
josm-revision: ["", "r19044"]
51+
uses: JOSM/JOSMPluginAction/.github/workflows/ant.yml@v3
52+
with:
53+
josm-revision: ${{ matrix.josm-revision }}
54+
perform-revision-tagging: ${{ github.repository == 'JOSM/rex' && github.ref_type == 'branch' && github.ref_name == 'master' && github.event_name != 'schedule' && github.event_name != 'pull_request' && matrix.josm-revision == 'r19044' }}
55+
secrets: inherit
56+
permissions:
57+
attestations: write
58+
checks: write
59+
contents: write
60+
deployments: write
61+
id-token: write

build.xml

+16-18
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<project name="rex" default="dist" basedir=".">
3-
<!-- enter the SVN commit message -->
4-
<property name="commit.message" value="Commit message"/>
5-
<!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
6-
<property name="plugin.main.version" value="18494"/>
7-
8-
<!-- Configure these properties (replace "..." accordingly).
3+
<!-- enter the SVN commit message -->
4+
<property name="commit.message" value="Commit message"/>
5+
<!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
6+
<property name="plugin.main.version" value="19044"/>
7+
<!-- Configure these properties (replace "..." accordingly).
98
See https://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
109
-->
11-
<property name="plugin.description" value="Expand a simple intersection to a roundabout in gradual steps. Select an intersection node or a roundabout and press Crtl-Shift-R"/>
12-
<property name="plugin.author" value="Gorm Egeberg Johnsen"/>
13-
<property name="plugin.class" value="org.openstreetmap.josm.plugins.rex.RoundaboutExpanderPlugin"/>
14-
<!--<property name="plugin.early" value="..."/>-->
15-
<property name="plugin.link" value="https://wiki.openstreetmap.org/wiki/JOSM/Plugins/RoundaboutExpander"/>
16-
<property name="plugin.icon" value="images/dialogs/logo-rex.svg"/>
17-
<!--<property name="plugin.requires" value="..."/>-->
18-
<!--<property name="plugin.stage" value="..."/>-->
19-
<property name="plugin.canloadatruntime" value="true"/>
20-
21-
<!-- ** include targets that all plugins have in common ** -->
22-
<import file="../build-common.xml"/>
10+
<property name="plugin.description" value="Expand a simple intersection to a roundabout in gradual steps. Select an intersection node or a roundabout and press Crtl-Shift-R"/>
11+
<property name="plugin.author" value="Gorm Egeberg Johnsen"/>
12+
<property name="plugin.class" value="org.openstreetmap.josm.plugins.rex.RoundaboutExpanderPlugin"/>
13+
<!--<property name="plugin.early" value="..."/>-->
14+
<property name="plugin.link" value="https://wiki.openstreetmap.org/wiki/JOSM/Plugins/RoundaboutExpander"/>
15+
<property name="plugin.icon" value="images/dialogs/logo-rex.svg"/>
16+
<!--<property name="plugin.requires" value="..."/>-->
17+
<!--<property name="plugin.stage" value="..."/>-->
18+
<property name="plugin.canloadatruntime" value="true"/>
19+
<!-- ** include targets that all plugins have in common ** -->
20+
<import file="../build-common.xml"/>
2321
</project>

pom.xml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" 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">
3+
<modelVersion>4.0.0</modelVersion>
4+
<parent>
5+
<groupId>org.openstreetmap.josm.plugins</groupId>
6+
<artifactId>plugin-root</artifactId>
7+
<version>SNAPSHOT</version>
8+
</parent>
9+
<artifactId>rex</artifactId>
10+
<url>${plugin.link}</url>
11+
<developers>
12+
<developer>
13+
<name>Gorm Egeberg Johnsen</name>
14+
</developer>
15+
</developers>
16+
<properties>
17+
<plugin.src.dir>src</plugin.src.dir>
18+
<plugin.main.version>19044</plugin.main.version>
19+
<plugin.description>Expand a simple intersection to a roundabout in gradual steps. Select an intersection node or a roundabout and press Crtl-Shift-R</plugin.description>
20+
<plugin.author>Gorm Egeberg Johnsen</plugin.author>
21+
<plugin.class>org.openstreetmap.josm.plugins.rex.RoundaboutExpanderPlugin</plugin.class>
22+
<plugin.link>https://wiki.openstreetmap.org/wiki/JOSM/Plugins/RoundaboutExpander</plugin.link>
23+
<plugin.icon>images/dialogs/logo-rex.svg</plugin.icon>
24+
<plugin.canloadatruntime>true</plugin.canloadatruntime>
25+
</properties>
26+
<build>
27+
<plugins>
28+
<plugin>
29+
<groupId>org.apache.maven.plugins</groupId>
30+
<artifactId>maven-jar-plugin</artifactId>
31+
<configuration>
32+
<archive>
33+
<manifestEntries>
34+
<Plugin-Link>${plugin.link}</Plugin-Link>
35+
<Plugin-Icon>${plugin.icon}</Plugin-Icon>
36+
<Plugin-Canloadatruntime>${plugin.canloadatruntime}</Plugin-Canloadatruntime>
37+
</manifestEntries>
38+
</archive>
39+
</configuration>
40+
</plugin>
41+
</plugins>
42+
</build>
43+
</project>

0 commit comments

Comments
 (0)