Skip to content

Commit 6db0e64

Browse files
committed
Add pom and update github workflow for auto releases
Signed-off-by: Taylor Smock <[email protected]>
1 parent 8eb856c commit 6db0e64

File tree

6 files changed

+129
-94
lines changed

6 files changed

+129
-94
lines changed

.github/workflows/ant-release.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/ant.yml

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,50 @@ on:
1212
- $default-branch
1313
workflow_dispatch:
1414

15+
permissions:
16+
id-token: write
17+
attestations: write
18+
contents: write
19+
packages: write
20+
checks: write
21+
1522
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/conflation' && 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+
1646
call-workflow:
47+
needs: check-release-needed
1748
strategy:
1849
matrix:
19-
josm-revision: ["", "r18221"]
20-
uses: JOSM/JOSMPluginAction/.github/workflows/ant.yml@v2
50+
josm-revision: ["", "r19044"]
51+
uses: JOSM/JOSMPluginAction/.github/workflows/ant.yml@v3
2152
with:
2253
josm-revision: ${{ matrix.josm-revision }}
23-
54+
perform-revision-tagging: ${{ github.repository == 'JOSM/conflation' && 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

.github/workflows/reports.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

build.properties

Lines changed: 0 additions & 29 deletions
This file was deleted.

build.xml

Lines changed: 29 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,32 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<project name="conflation" default="dist" basedir=".">
3-
4-
<property file="build.properties" />
5-
6-
<!-- enter the SVN commit message -->
7-
<property name="commit.message" value="Conflation"/>
8-
<!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
9-
<property name="plugin.main.version" value="${josm.required.version}"/>
10-
11-
<property name="plugin.author" value="Josh Doe"/>
12-
<property name="plugin.class" value="org.openstreetmap.josm.plugins.conflation.ConflationPlugin"/>
13-
<property name="plugin.description" value="Tool for conflating data (matching and merging)."/>
14-
<property name="plugin.icon" value="images/dialogs/conflation.png"/>
15-
<property name="plugin.link" value="https://wiki.openstreetmap.org/wiki/JOSM/Plugins/Conflation"/>
16-
<property name="plugin.requires" value="jts;utilsplugin2"/>
17-
<property name="plugin.canloadatruntime" value="true"/>
18-
<property name="version.entry.commit.revision" value="${plugin.version}"/>
19-
20-
<target name="additional-manifest">
21-
<manifest file="MANIFEST" mode="update">
22-
<attribute name="11609_Plugin-Url" value="v0.5.5;https://github.com/JOSM/conflation/releases/download/v0.5.5/conflation.jar" />
23-
<attribute name="12859_Plugin-Url" value="v0.5.6;https://github.com/JOSM/conflation/releases/download/v0.5.6/conflation.jar" />
24-
<attribute name="13561_Plugin-Url" value="v0.5.7;https://github.com/JOSM/conflation/releases/download/v0.5.7/conflation.jar" />
25-
<attribute name="13564_Plugin-Url" value="v0.6.0;https://github.com/JOSM/conflation/releases/download/v0.6.0/conflation.jar" />
26-
<attribute name="14371_Plugin-Url" value="v0.6.5;https://github.com/JOSM/conflation/releases/download/v0.6.5/conflation.jar" />
27-
<attribute name="16799_Plugin-Url" value="v0.6.6;https://github.com/JOSM/conflation/releases/download/v0.6.6/conflation.jar" />
28-
</manifest>
29-
</target>
30-
31-
<!-- ** include targets that all plugins have in common ** -->
32-
<import file="../build-common.xml"/>
33-
34-
<fileset id="plugin.requires.jars" dir="${plugin.dist.dir}">
35-
<include name="jts.jar"/>
36-
<include name="utilsplugin2.jar"/>
37-
</fileset>
38-
3+
<!-- enter the SVN commit message -->
4+
<property name="commit.message" value="Conflation"/>
5+
<!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
6+
<property name="plugin.main.version" value="19044"/>
7+
<property name="plugin.author" value="Josh Doe"/>
8+
<property name="plugin.class" value="org.openstreetmap.josm.plugins.conflation.ConflationPlugin"/>
9+
<property name="plugin.description" value="Tool for conflating data (matching and merging)."/>
10+
<property name="plugin.icon" value="images/dialogs/conflation.png"/>
11+
<property name="plugin.link" value="https://wiki.openstreetmap.org/wiki/JOSM/Plugins/Conflation"/>
12+
<property name="plugin.requires" value="jts;utilsplugin2"/>
13+
<property name="plugin.canloadatruntime" value="true"/>
14+
<property name="version.entry.commit.revision" value="${plugin.version}"/>
15+
<target name="additional-manifest">
16+
<manifest file="MANIFEST" mode="update">
17+
<attribute name="11609_Plugin-Url" value="v0.5.5;https://github.com/JOSM/conflation/releases/download/v0.5.5/conflation.jar"/>
18+
<attribute name="12859_Plugin-Url" value="v0.5.6;https://github.com/JOSM/conflation/releases/download/v0.5.6/conflation.jar"/>
19+
<attribute name="13561_Plugin-Url" value="v0.5.7;https://github.com/JOSM/conflation/releases/download/v0.5.7/conflation.jar"/>
20+
<attribute name="13564_Plugin-Url" value="v0.6.0;https://github.com/JOSM/conflation/releases/download/v0.6.0/conflation.jar"/>
21+
<attribute name="14371_Plugin-Url" value="v0.6.5;https://github.com/JOSM/conflation/releases/download/v0.6.5/conflation.jar"/>
22+
<attribute name="16799_Plugin-Url" value="v0.6.6;https://github.com/JOSM/conflation/releases/download/v0.6.6/conflation.jar"/>
23+
<attribute name="18221_Plugin-Url" value="v0.6.11;https://github.com/JOSM/conflation/releases/download/v0.6.11/conflation.jar"/>
24+
</manifest>
25+
</target>
26+
<!-- ** include targets that all plugins have in common ** -->
27+
<import file="../build-common.xml"/>
28+
<fileset id="plugin.requires.jars" dir="${plugin.dist.dir}">
29+
<include name="jts.jar"/>
30+
<include name="utilsplugin2.jar"/>
31+
</fileset>
3932
</project>

pom.xml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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>auto-tools</artifactId>
10+
<url>${plugin.link}</url>
11+
<developers>
12+
<developer>
13+
<name>Josh Doe</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.author>Josh Doe</plugin.author>
20+
<plugin.class>org.openstreetmap.josm.plugins.conflation.ConflationPlugin</plugin.class>
21+
<plugin.description>Tool for conflating data (matching and merging).</plugin.description>
22+
<plugin.icon>images/dialogs/conflation.png</plugin.icon>
23+
<plugin.link>https://wiki.openstreetmap.org/wiki/JOSM/Plugins/Conflation</plugin.link>
24+
<plugin.requires>jts;utilsplugin2</plugin.requires>
25+
<plugin.canloadatruntime>true</plugin.canloadatruntime>
26+
</properties>
27+
<dependencies>
28+
<dependency>
29+
<groupId>org.openstreetmap.josm.plugins</groupId>
30+
<artifactId>jts</artifactId>
31+
<version>SNAPSHOT</version>
32+
<scope>provided</scope>
33+
</dependency>
34+
<dependency>
35+
<groupId>org.openstreetmap.josm.plugins</groupId>
36+
<artifactId>utilsplugin2</artifactId>
37+
<version>SNAPSHOT</version>
38+
<scope>provided</scope>
39+
</dependency>
40+
</dependencies>
41+
<build>
42+
<plugins>
43+
<plugin>
44+
<groupId>org.apache.maven.plugins</groupId>
45+
<artifactId>maven-jar-plugin</artifactId>
46+
<configuration>
47+
<archive>
48+
<manifestEntries>
49+
<Plugin-Link>${plugin.link}</Plugin-Link>
50+
<Plugin-Icon>${plugin.icon}</Plugin-Icon>
51+
<Plugin-Canloadatruntime>${plugin.canloadatruntime}</Plugin-Canloadatruntime>
52+
<Plugin-Requires>${plugin.requires}</Plugin-Requires>
53+
</manifestEntries>
54+
</archive>
55+
</configuration>
56+
</plugin>
57+
</plugins>
58+
</build>
59+
</project>

0 commit comments

Comments
 (0)