Index: trunk/.github/workflows/ant.yml
===================================================================
--- trunk/.github/workflows/ant.yml	(revision 17235)
+++ trunk/.github/workflows/ant.yml	(revision 17236)
@@ -1,6 +1,7 @@
 name: Java CI
 env:
+  junit_platform_version: '1.7.0'
   # ANT_HOME is also our ant version
-  ANT_HOME: "apache-ant-1.10.8"
+  ANT_HOME: 'apache-ant-1.10.9'
 on:
   push:
@@ -22,5 +23,5 @@
       matrix:
         # test against latest update of each major Java version, as well as specific updates of LTS versions:
-        java: [8, 11, 14]
+        java: [8, 11, 14, 15, 16-ea]
         os: [ubuntu-latest, macos-latest, windows-latest]
         headless: ["true", "false"]
@@ -39,21 +40,34 @@
         uses: actions/checkout@v2
         with:
-          fetch-depth: 64
+          fetch-depth: 128
       - name: Cache
         uses: actions/cache@v2.0.0
         with:
-          path: |
+          path:  |
             ~/.ivy2/cache/
             ~/work/josm/josm/tools/
           key: ${{ runner.os }}-ivy2-${{ hashFiles('ivy.xml') }}
       - name: Setup java
-        uses: actions/setup-java@v1.3.0
+        uses: actions/setup-java@v1.4.3
         with:
           java-version: ${{ matrix.java }}
-      - name: Install ant ${{ env.ANT_HOME }}
+      - name: Install ant ${{ env.ANT_HOME }} and junit ${{ env.junit_platform_version }}
+        # Todo: cache ant and junit, saves 12 seconds.
         run: |
-          curl -s https://archive.apache.org/dist/ant/binaries/${{ env.ANT_HOME }}-bin.tar.gz | tar -xz
+          curl -s https://downloads.apache.org/ant/binaries/${{ env.ANT_HOME }}-bin.tar.gz | tar -xz
+          curl -o ${{ env.ANT_HOME }}/lib/junit-platform-console-standalone-${{ env.junit_platform_version }}.jar  "https://repo1.maven.org/maven2/org/junit/platform/junit-platform-console-standalone/${{ env.junit_platform_version }}/junit-platform-console-standalone-${{ env.junit_platform_version }}.jar"
       - name: Print ant version, expecting ${{ env.ANT_HOME }}
-        run: ${{ env.ANT_HOME }}/bin/ant -diagnostics
+        run: ${{ env.ANT_HOME }}/bin/ant -version
+      - name: Set revision env variable
+        run: |
+          ant create-revision
+          josm_revision=`awk '/Revision/{print $2}' resources/REVISION`
+          if [[ "$josm_revision" == `curl --silent https://josm.openstreetmap.de/tested` ]]; then
+            sed -i .bak '/Is-Local-Build/d' resources/REVISION
+            echo "josm_prerelease=false" >> $GITHUB_ENV
+          else
+            echo "josm_prerelease=true" >> $GITHUB_ENV
+          fi
+          echo "josm_revision=$josm_revision" >> $GITHUB_ENV
       - name: Build with Ant, headless ${{ matrix.headless }}
         run: |
@@ -67,8 +81,4 @@
         if: ${{ failure() }}
         run: "grep -L ', Failures: 0, Skipped: ' test/report/*.txt | xargs cat"
-      - name: Set revision env variable
-        if: ${{ always() }}
-        # Careful, you will only have a resources/REVISION if you've already built
-        run: echo "::set-env name=josm_revision::`awk '/Revision/{print $2}' resources/REVISION`"
       - name: Upload Ant reports
         if: ${{ always() }}
@@ -77,4 +87,12 @@
           name: Ant reports for JOSM ${{ env.josm_revision }} on java ${{ matrix.java }} on ${{ matrix.os }} with headless=${{ matrix.headless }}
           path: test/report/*.txt
+      - name: Optimise images
+        if: ${{ runner.os == 'macos' && always() }}
+        run: |
+          brew cask install imageoptim
+          defaults write net.pornel.ImageOptim SvgoEnabled 1
+          defaults write net.pornel.ImageOptim PngCrush2Enabled 1
+          defaults write net.pornel.ImageOptim PngOutEnabled 1
+          /Applications/ImageOptim.app/Contents/MacOS/ImageOptim resources/images
       - name: Build and package for macOS
         if: ${{ runner.os == 'macos' && always() }}
@@ -86,8 +104,37 @@
           $ANT_HOME/bin/ant dist
           ./native/macosx/macos-jpackage.sh ${{ env.josm_revision }}
-      - name: Upload JOSM.app for macOS
+      - name: Create macOS release
         if: ${{ runner.os == 'macos' && always() }}
-        uses: actions/upload-artifact@v2
+        id: create_release
+        uses: actions/create-release@v1
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
         with:
-          name: JOSM.app revision ${{ env.josm_revision }}
-          path: dist/JOSM.zip
+          tag_name: ${{ env.josm_revision }}
+          release_name: JOSM.app release ${{ env.josm_revision }}
+          body: |
+            JOSM.app release ${{ env.josm_revision }}
+          draft: false
+          prerelease: ${{ env.josm_prerelease }}
+      - name: Upload app
+        if: ${{ runner.os == 'macos' && always() }}
+        id: upload-app
+        uses: actions/upload-release-asset@v1
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        with:
+          upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing its ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps 
+          asset_path: dist/JOSM.zip
+          asset_name: JOSM-${{ runner.os}}-java${{ matrix.java }}.zip
+          asset_content_type: application/zip
+      - name: Upload jar
+        if: ${{ runner.os == 'macos' && always() }}
+        id: upload-jar
+        uses: actions/upload-release-asset@v1
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        with:
+          upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing its ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps 
+          asset_path: dist/josm-custom.jar
+          asset_name: josm-latest.jar
+          asset_content_type: application/java-archive
Index: trunk/build.xml
===================================================================
--- trunk/build.xml	(revision 17235)
+++ trunk/build.xml	(revision 17236)
@@ -194,5 +194,5 @@
                    shortversion="${version.entry.commit.revision} SVN"
                    version="${version.entry.commit.revision} SVN"
-                   icon="native/macosx/JOSM.app/Contents/Resources/JOSM.icns"
+                   icon="native/macosx/JOSM.icns"
                    highResolutionCapable="true">
 
Index: trunk/native/macosx/gz.properties
===================================================================
--- trunk/native/macosx/gz.properties	(revision 17235)
+++ trunk/native/macosx/gz.properties	(revision 17236)
@@ -1,3 +1,3 @@
 extension=gz
 mime-type=application/gzip
-description=OpenStreetMap BZipped
+description=OpenStreetMap GZipped
Index: trunk/native/macosx/jos.properties
===================================================================
--- trunk/native/macosx/jos.properties	(revision 17235)
+++ trunk/native/macosx/jos.properties	(revision 17236)
@@ -1,3 +1,3 @@
-extension=joz
+extension=jos
 mime-type=application/x-josm-session+xml
 description=JOSM Session
Index: trunk/native/macosx/macos-jpackage.sh
===================================================================
--- trunk/native/macosx/macos-jpackage.sh	(revision 17235)
+++ trunk/native/macosx/macos-jpackage.sh	(revision 17236)
@@ -19,5 +19,5 @@
 jpackage -n "JOSM" --input dist --main-jar josm-custom.jar \
     --main-class org.openstreetmap.josm.gui.MainApplication \
-    --icon native/macosx/JOSM.app/Contents/Resources/JOSM.icns --type app-image --dest dist \
+    --icon ./native/macosx/JOSM.icns --type app-image --dest dist \
     --java-options "-Xmx8192m" --app-version $1 \
     --copyright "JOSM, and all its integral parts, are released under the GNU General Public License v2 or later" \
@@ -80,10 +80,6 @@
 
 echo "Preparing for notarization"
-ditto -c -k --keepParent dist/JOSM.app dist/JOSM.zip
+ditto -c -k --zlibCompressionLevel 9 --keepParent dist/JOSM.app dist/JOSM.zip
 
 echo "Uploading to Apple"
 xcrun altool --notarize-app -f dist/JOSM.zip -p "$APPLE_ID_PW" -u "thomas.skowron@fossgis.de" --primary-bundle-id de.openstreetmap.josm
-
-# Prepare for upload-artifact
-mkdir dist-macOS
-unzip dist/JOSM.zip -d dist-macOS
