Skip to content

Commit

Permalink
Update GitHub workflow, add pom.xml
Browse files Browse the repository at this point in the history
Signed-off-by: Taylor Smock <[email protected]>
  • Loading branch information
tsmock committed Aug 2, 2024
1 parent 8031a51 commit d06beac
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 4 deletions.
29 changes: 27 additions & 2 deletions .github/workflows/ant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,40 @@ on:
workflow_dispatch:

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/OpenQA' && 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/main"* ]]; then
release_needed="true"
break
fi
done
echo "release_needed=$release_needed" >> $GITHUB_OUTPUT
call-workflow:
needs: check-release-needed
strategy:
matrix:
josm-revision: ["", "r18723"]
josm-revision: ["", "r19044"]
uses: JOSM/JOSMPluginAction/.github/workflows/ant.yml@v2
with:
josm-revision: ${{ matrix.josm-revision }}
plugin-jar-name: 'openqa'
perform-revision-tagging: ${{ github.repository == 'JOSM/OpenQA' && github.ref_type == 'branch' && github.ref_name == 'master' && github.event_name != 'schedule' && github.event_name != 'pull_request' && matrix.josm-revision == 'r18724' }}
perform-revision-tagging: ${{ github.repository == 'JOSM/OpenQA' && github.ref_type == 'branch' && github.ref_name == 'master' && github.event_name != 'schedule' && github.event_name != 'pull_request' && matrix.josm-revision == 'r19044' }}
secrets: inherit
permissions:
contents: write
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# The minimum JOSM version this plugin is compatible with (can be any numeric version)
plugin.main.version = 18723
plugin.main.version = 19044
# The JOSM version this plugin is currently compiled against
# Please make sure this version is available at https://josm.openstreetmap.de/download
# The special values "latest" and "tested" are also possible here, but not recommended.
plugin.compile.version = 18724
plugin.compile.version = 19044
plugin.canloadatruntime = true
plugin.author = Taylor Smock <incoming+gokaart/[email protected]>
plugin.class = com.kaart.openqa.OpenQA
Expand Down
50 changes: 50 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<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>1.0-SNAPSHOT</version>
</parent>
<artifactId>openqa</artifactId>

<url>${plugin.link}</url>
<developers>
<developer>
<id>tsmock</id>
<name>Taylor Smock</name>
<email>[email protected]</email>
</developer>
</developers>
<properties>
<plugin.src.dir>src</plugin.src.dir>
<plugin.main.version>19044</plugin.main.version>
<plugin.author>Taylor Smock &lt;incoming+gokaart/[email protected]&gt;</plugin.author>
<plugin.class>com.kaart.openqa.OpenQA</plugin.class>
<plugin.description>OpenQA validation checker (supports Osmose and Keepright))</plugin.description>
<plugin.icon>images/openqa.svg</plugin.icon>
<plugin.link>https://github.com/JOSM/OpenQA</plugin.link>
<plugin.canloadatruntime>true</plugin.canloadatruntime>
<plugin.test.dir>${project.basedir}/src/test</plugin.test.dir>
<plugin.src.dir>${project.basedir}/src/main/java</plugin.src.dir>
<!-- most plugins default to resource directories in root, e.g. ./data, ./images, ./resources -->
<plugin.resources.dir>${project.basedir}/src/main/resources</plugin.resources.dir>
</properties>
<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>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</project>

0 comments on commit d06beac

Please sign in to comment.