Skip to content

Commit c93f8da

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

File tree

3 files changed

+57
-25
lines changed

3 files changed

+57
-25
lines changed

.github/workflows/ant.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ 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:
1623
check-release-needed:
1724
runs-on: ubuntu-latest
@@ -29,23 +36,26 @@ jobs:
2936
last_tag=$(git describe --tags --abbrev=0 --always)
3037
release_needed="false"
3138
for file in $(git diff ${last_tag}..HEAD --name-only); do
32-
if [[ $file = "src/"* ]]; then
39+
if [[ $file = "src/"* ]] || [[ $file = "data/*" ]] || [[ $file = "lib/*" ]] || [[ $file = "resources/*" ]] || [[ $file = "images/*" ]]; then
3340
release_needed="true"
3441
break
3542
fi
3643
done
3744
echo "release_needed=$release_needed" >> $GITHUB_OUTPUT
3845
39-
4046
call-workflow:
4147
needs: check-release-needed
4248
strategy:
4349
matrix:
4450
josm-revision: ["", "r19044"]
45-
uses: JOSM/JOSMPluginAction/.github/workflows/ant.yml@v2
51+
uses: JOSM/JOSMPluginAction/.github/workflows/ant.yml@v3
4652
with:
4753
josm-revision: ${{ matrix.josm-revision }}
48-
perform-revision-tagging: ${{ matrix.josm-revision == 'r19044' && needs.check-release-needed.outputs.release_needed == 'true' }}
49-
plugin-jar-name: 'config'
54+
perform-revision-tagging: ${{ github.repository == 'JOSM/configuration' && github.ref_type == 'branch' && github.ref_name == 'master' && github.event_name != 'schedule' && github.event_name != 'pull_request' && matrix.josm-revision == 'r19044' }}
5055
secrets: inherit
51-
56+
permissions:
57+
attestations: write
58+
checks: write
59+
contents: write
60+
deployments: write
61+
id-token: write

build.xml

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<project name="config" default="dist" basedir=".">
3-
<property name="commit.message" value="Commit message"/>
4-
<property name="plugin.main.version" value="19044"/>
5-
<property name="plugin.author" value="Aarthy KC"/>
6-
<property name="plugin.class" value="org.openstreetmap.josm.plugins.ConfigPlugin"/>
7-
<property name="plugin.description" value="Task configurations"/>
8-
<!--<property name="plugin.icon" value="..."/>-->
9-
<!--<property name="plugin.link" value="..."/>-->
10-
<!--<property name="plugin.early" value="..."/>-->
11-
<!--<property name="plugin.requires" value="..."/>-->
12-
<!--<property name="plugin.stage" value="..."/>-->
13-
<target name="additional-manifest">
14-
<manifest file="MANIFEST" mode="update">
15-
<attribute name="13558_Plugin-Url" value="v1.2;https://github.com/JOSM/configuration/releases/download/v1.2/config.jar" />
16-
<attribute name="14153_Plugin-Url" value="v1.2.2;https://github.com/JOSM/configuration/releases/download/v1.2.2/config.jar" />
17-
</manifest>
18-
</target>
19-
<!-- ** include targets that all plugins have in common ** -->
20-
<import file="../build-common.xml"/>
21-
3+
<property name="commit.message" value="Commit message"/>
4+
<property name="plugin.main.version" value="19044"/>
5+
<property name="plugin.author" value="Aarthy KC"/>
6+
<property name="plugin.class" value="org.openstreetmap.josm.plugins.ConfigPlugin"/>
7+
<property name="plugin.description" value="Task configurations"/>
8+
<!--<property name="plugin.icon" value="..."/>-->
9+
<!--<property name="plugin.link" value="..."/>-->
10+
<!--<property name="plugin.early" value="..."/>-->
11+
<!--<property name="plugin.requires" value="..."/>-->
12+
<!--<property name="plugin.stage" value="..."/>-->
13+
<target name="additional-manifest">
14+
<manifest file="MANIFEST" mode="update">
15+
<attribute name="13558_Plugin-Url" value="v1.2;https://github.com/JOSM/configuration/releases/download/v1.2/config.jar"/>
16+
<attribute name="14153_Plugin-Url" value="v1.2.2;https://github.com/JOSM/configuration/releases/download/v1.2.2/config.jar"/>
17+
</manifest>
18+
</target>
19+
<!-- ** include targets that all plugins have in common ** -->
20+
<import file="../build-common.xml"/>
2221
</project>

pom.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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>configuration</artifactId>
10+
<url>${plugin.link}</url>
11+
<developers>
12+
<developer>
13+
<name>Aarthy KC</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>Aarthy KC</plugin.author>
20+
<plugin.class>org.openstreetmap.josm.plugins.ConfigPlugin</plugin.class>
21+
<plugin.description>Task configurations</plugin.description>
22+
</properties>
23+
</project>

0 commit comments

Comments
 (0)