Skip to content

Commit

Permalink
Set up CI autorelease
Browse files Browse the repository at this point in the history
Signed-off-by: Taylor Smock <tsmock@meta.com>
  • Loading branch information
tsmock committed Oct 1, 2024
1 parent 0d29ee1 commit 8ba6fcc
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 4 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/ant.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
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/ShapeTools' && 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: ${{ matrix.josm-revision == 'r19044' && needs.check-release-needed.outputs.release_needed == 'true' }}
secrets: inherit

6 changes: 2 additions & 4 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<project name="ShapeTools" default="dist" basedir=".">
<!-- enter the SVN commit message -->
<property name="commit.message" value="ShapeTools: update for compatibility with JOSM r17896"/>
<!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
<property name="plugin.main.version" value="18221"/>
<property name="plugin.main.version" value="19044"/>

<property name="plugin.author" value="Antochi Adrian and Trifan Adrian"/>
<property name="plugin.class" value="org.openstreetmap.josm.plugins.shapetools.ShapeToolsPlugin"/>
<property name="plugin.description" value="Gives user more tools that facilitate aligning and rotation of buildings."/>
<property name="plugin.icon" value="images/shapeToolsIcon.png"/>
<property name="plugin.link" value="https://wiki.openstreetmap.org/wiki/JOSM/Plugins/ShapeTools"/>
<property name="version.entry.commit.revision" value="1250"/>

<target name="additional-manifest">
<manifest file="MANIFEST" mode="update">
<attribute name="12636_Plugin-Url" value="v1.2.3;https://github.com/JOSM/ShapeTools/releases/download/v1.2.3/ShapeTools.jar" />
<attribute name="14153_Plugin-Url" value="v1.2.4;https://github.com/JOSM/ShapeTools/releases/download/v1.2.4/ShapeTools.jar" />
<attribute name="17896_Plugin-Url" value="v1.2.5;https://github.com/JOSM/ShapeTools/releases/download/v1.2.5/ShapeTools.jar" />
<attribute name="18221_Plugin-Url" value="v1.2.7;https://github.com/JOSM/ShapeTools/releases/download/v1.2.7/ShapeTools.jar" />
</manifest>
</target>

Expand Down

0 comments on commit 8ba6fcc

Please sign in to comment.