From 14bebe6748ef7bbdc03245c95c652edfe190137f Mon Sep 17 00:00:00 2001 From: Taylor Smock Date: Thu, 30 Jan 2025 07:03:22 -0700 Subject: [PATCH] Update pom and github workflow for auto releases Signed-off-by: Taylor Smock --- .github/workflows/ant.yml | 25 +++-- build.xml | 45 +++++---- pom.xml | 186 +++++++++++++++++++++----------------- 3 files changed, 142 insertions(+), 114 deletions(-) diff --git a/.github/workflows/ant.yml b/.github/workflows/ant.yml index 7d0c9f3..30500c8 100644 --- a/.github/workflows/ant.yml +++ b/.github/workflows/ant.yml @@ -10,10 +10,15 @@ on: branches: - master - $default-branch - schedule: - - cron: "43 13 * * 1" workflow_dispatch: +permissions: + id-token: write + attestations: write + contents: write + packages: write + checks: write + jobs: check-release-needed: runs-on: ubuntu-latest @@ -31,23 +36,27 @@ 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/main"* ]]; then + if [[ $file = "src/main/"* ]] || [[ $file = "data/"* ]]; then release_needed="true" break fi done echo "release_needed=$release_needed" >> $GITHUB_OUTPUT - call-workflow: needs: check-release-needed strategy: matrix: - josm-revision: ["", "r18877"] - uses: JOSM/JOSMPluginAction/.github/workflows/ant.yml@v2 + josm-revision: ["", "r19044"] + uses: JOSM/JOSMPluginAction/.github/workflows/ant.yml@v3 with: josm-revision: ${{ matrix.josm-revision }} java-version: 17 - perform-revision-tagging: ${{ matrix.josm-revision == 'r18877' && needs.check-release-needed.outputs.release_needed == 'true' }} + perform-revision-tagging: ${{ github.repository == 'JOSM/MapRoulette' && 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 diff --git a/build.xml b/build.xml index 74d91c7..04ebcae 100644 --- a/build.xml +++ b/build.xml @@ -1,26 +1,23 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + diff --git a/pom.xml b/pom.xml index 3786aa9..825ef4d 100644 --- a/pom.xml +++ b/pom.xml @@ -1,83 +1,105 @@ - - 4.0.0 - - org.openstreetmap.josm.plugins - plugin-root - SNAPSHOT - - maproulette - 1.0-SNAPSHOT - - ${project.basedir}/src/main/java - ${project.basedir}/src/main/resources - ${project.basedir}/src/test/ - ${plugin.test.dir}/resources - - - - org.commonmark - commonmark - 0.22.0 - compile - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 17 - - - - com.diffplug.spotless - spotless-maven-plugin - 2.43.0 - - - - 4.21 - ${project.basedir}/../00_core_tools/eclipse/formatter.xml - - - - // License: GPL. For details, see LICENSE file. - - - - - - - check - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - 3.4.1 - - - enforce-versions - - enforce - - - - - 3.6.3 - - - 17 - - - - - - - - + + + 4.0.0 + + org.openstreetmap.josm.plugins + plugin-root + SNAPSHOT + + maproulette + SNAPSHOT + + 17 + 19044 + ${project.basedir}/src/main/java + ${project.basedir}/src/main/resources + ${project.basedir}/src/test/ + ${plugin.test.dir}/resources + Taylor Smock + org.openstreetmap.josm.plugins.maproulette.MapRoulette + MapRoulette Tasks in JOSM + images/dialogs/user_no_image.png + https://github.com/JOSM/MapRoulette + ${java.lang.version} + true + + + + org.commonmark + commonmark + 0.22.0 + compile + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + ${plugin.link} + ${plugin.icon} + ${plugin.canloadatruntime} + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + ${java.lang.version} + + + + com.diffplug.spotless + spotless-maven-plugin + 2.43.0 + + + + 4.21 + ${project.basedir}/../00_core_tools/eclipse/formatter.xml + + + + // License: GPL. For details, see LICENSE file. + + + + + + + check + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.4.1 + + + enforce-versions + + enforce + + + + + 3.6.3 + + + ${java.lang.version} + + + + + + + +