Skip to content

Commit

Permalink
Add pom and 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 64ba0d3 commit ef1bc50
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 90 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/ant.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Java CI

on:
push:
branches:
- master
- $default-branch
- $protected-branches
pull_request:
branches:
- master
- $default-branch
workflow_dispatch:

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

jobs:
check-release-needed:
runs-on: ubuntu-latest
outputs:
release_needed: ${{ steps.create_release_needed.outputs.release_needed }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: ${{ (github.repository == 'JOSM/auto-tools' && github.ref_type == 'branch' && github.ref_name == 'master' && github.event_name != 'schedule' && github.event_name != 'pull_request') && '0' || '1' }}

- name: Set release needed
id: create_release_needed
run: |
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/"* ]] || [[ $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@v3
with:
josm-revision: ${{ matrix.josm-revision }}
perform-revision-tagging: ${{ github.repository == 'JOSM/auto-tools' && github.ref_type == 'branch' && github.ref_name == 'master' && github.event_name != 'schedule' && github.event_name != 'pull_request' && matrix.josm-revision == 'r19044' }}
plugin-jar-name: "continuosDownload"
secrets: inherit
permissions:
attestations: write
checks: write
contents: write
deployments: write
id-token: write
3 changes: 1 addition & 2 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<project name="auto_tools" default="dist" basedir=".">
<property name="commit.message" value="Auto Tools"/>
<property name="plugin.main.version" value="18494"/>
<property name="plugin.version" value="1.3.5"/>
<property name="plugin.author" value="Rub21,samely"/>
<property name="plugin.class" value="org.openstreetmap.josm.plugins.auto_tools.AutoTools"/>
<property name="plugin.description" value="Automatic tools to help on common issues"/>
Expand All @@ -16,7 +15,7 @@
<attribute name="13922_Plugin-Url" value="v1.3;https://github.com/JOSM/auto-tools/releases/download/v1.3/auto_tools.jar" />
<attribute name="14960_Plugin-Url" value="v1.3.2;https://github.com/JOSM/auto-tools/releases/download/v1.3.2/auto_tools.jar" />
<attribute name="17896_Plugin-Url" value="v1.3.4;https://github.com/JOSM/auto-tools/releases/download/v1.3.4/auto_tools.jar" />

<attribute name="18494_Plugin-Url" value="v1.3.5;https://github.com/JOSM/auto-tools/releases/download/v1.3.5/auto_tools.jar" />
</manifest>
</target>
<import file="../build-common.xml"/>
Expand Down
12 changes: 0 additions & 12 deletions nbproject/private/private.xml

This file was deleted.

76 changes: 0 additions & 76 deletions nbproject/project.xml

This file was deleted.

57 changes: 57 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<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>auto-tools</artifactId>

<url>${plugin.link}</url>
<developers>
<developer>
<id>Rub21</id>
</developer>
<developer>
<id>samely</id>
</developer>
</developers>
<properties>
<plugin.src.dir>src</plugin.src.dir>
<plugin.main.version>19044</plugin.main.version>
<plugin.author>Rub21,samely</plugin.author>
<plugin.class>org.openstreetmap.josm.plugins.auto_tools.AutoTools</plugin.class>
<plugin.description>Automatic tools to help on common issues</plugin.description>
<plugin.link>https://github.com/JOSM/auto-tools</plugin.link>
<plugin.canloadatruntime>true</plugin.canloadatruntime>
<plugin.icon>images/wrench.png</plugin.icon>
<plugin.requires>utilsplugin2</plugin.requires>
</properties>
<dependencies>
<dependency>
<groupId>org.openstreetmap.josm.plugins</groupId>
<artifactId>utilsplugin2</artifactId>
<version>SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Plugin-Link>${plugin.link}</Plugin-Link>
<Plugin-Icon>${plugin.icon}</Plugin-Icon>
<Plugin-Canloadatruntime>${plugin.canloadatruntime}</Plugin-Canloadatruntime>
<Plugin-Requires>${plugin.requires}</Plugin-Requires>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</project>

0 comments on commit ef1bc50

Please sign in to comment.