Skip to content

Commit

Permalink
Add pom and update github workflow for auto releases
Browse files Browse the repository at this point in the history
Signed-off-by: Taylor Smock <[email protected]>
  • Loading branch information
tsmock committed Jan 30, 2025
1 parent 34ee850 commit c93f8da
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 25 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/ant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ on:
- $default-branch
workflow_dispatch:

permissions:
id-token: write
attestations: write
contents: write
packages: write
checks: write

jobs:
check-release-needed:
runs-on: ubuntu-latest
Expand All @@ -29,23 +36,26 @@ jobs:
last_tag=$(git describe --tags --abbrev=0 --always)
release_needed="false"
for file in $(git diff ${last_tag}..HEAD --name-only); do
if [[ $file = "src/"* ]]; then
if [[ $file = "src/"* ]] || [[ $file = "data/*" ]] || [[ $file = "lib/*" ]] || [[ $file = "resources/*" ]] || [[ $file = "images/*" ]]; then
release_needed="true"
break
fi
done
echo "release_needed=$release_needed" >> $GITHUB_OUTPUT
call-workflow:
needs: check-release-needed
strategy:
matrix:
josm-revision: ["", "r19044"]
uses: JOSM/JOSMPluginAction/.github/workflows/ant.yml@v2
uses: JOSM/JOSMPluginAction/.github/workflows/ant.yml@v3
with:
josm-revision: ${{ matrix.josm-revision }}
perform-revision-tagging: ${{ matrix.josm-revision == 'r19044' && needs.check-release-needed.outputs.release_needed == 'true' }}
plugin-jar-name: 'config'
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' }}
secrets: inherit

permissions:
attestations: write
checks: write
contents: write
deployments: write
id-token: write
37 changes: 18 additions & 19 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<project name="config" default="dist" basedir=".">
<property name="commit.message" value="Commit message"/>
<property name="plugin.main.version" value="19044"/>
<property name="plugin.author" value="Aarthy KC"/>
<property name="plugin.class" value="org.openstreetmap.josm.plugins.ConfigPlugin"/>
<property name="plugin.description" value="Task configurations"/>
<!--<property name="plugin.icon" value="..."/>-->
<!--<property name="plugin.link" value="..."/>-->
<!--<property name="plugin.early" value="..."/>-->
<!--<property name="plugin.requires" value="..."/>-->
<!--<property name="plugin.stage" value="..."/>-->
<target name="additional-manifest">
<manifest file="MANIFEST" mode="update">
<attribute name="13558_Plugin-Url" value="v1.2;https://github.com/JOSM/configuration/releases/download/v1.2/config.jar" />
<attribute name="14153_Plugin-Url" value="v1.2.2;https://github.com/JOSM/configuration/releases/download/v1.2.2/config.jar" />
</manifest>
</target>
<!-- ** include targets that all plugins have in common ** -->
<import file="../build-common.xml"/>

<property name="commit.message" value="Commit message"/>
<property name="plugin.main.version" value="19044"/>
<property name="plugin.author" value="Aarthy KC"/>
<property name="plugin.class" value="org.openstreetmap.josm.plugins.ConfigPlugin"/>
<property name="plugin.description" value="Task configurations"/>
<!--<property name="plugin.icon" value="..."/>-->
<!--<property name="plugin.link" value="..."/>-->
<!--<property name="plugin.early" value="..."/>-->
<!--<property name="plugin.requires" value="..."/>-->
<!--<property name="plugin.stage" value="..."/>-->
<target name="additional-manifest">
<manifest file="MANIFEST" mode="update">
<attribute name="13558_Plugin-Url" value="v1.2;https://github.com/JOSM/configuration/releases/download/v1.2/config.jar"/>
<attribute name="14153_Plugin-Url" value="v1.2.2;https://github.com/JOSM/configuration/releases/download/v1.2.2/config.jar"/>
</manifest>
</target>
<!-- ** include targets that all plugins have in common ** -->
<import file="../build-common.xml"/>
</project>
23 changes: 23 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0"?>
<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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.openstreetmap.josm.plugins</groupId>
<artifactId>plugin-root</artifactId>
<version>SNAPSHOT</version>
</parent>
<artifactId>configuration</artifactId>
<url>${plugin.link}</url>
<developers>
<developer>
<name>Aarthy KC</name>
</developer>
</developers>
<properties>
<plugin.src.dir>src</plugin.src.dir>
<plugin.main.version>19044</plugin.main.version>
<plugin.author>Aarthy KC</plugin.author>
<plugin.class>org.openstreetmap.josm.plugins.ConfigPlugin</plugin.class>
<plugin.description>Task configurations</plugin.description>
</properties>
</project>

0 comments on commit c93f8da

Please sign in to comment.