From 7616a873fd20c529732460821798d7bfc25513e3 Mon Sep 17 00:00:00 2001 From: Taylor Smock Date: Tue, 9 Jul 2024 12:19:42 -0600 Subject: [PATCH] Switch to auto releases Signed-off-by: Taylor Smock --- .github/workflows/ant-release.yml | 30 ------------------------------ .github/workflows/ant.yml | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 30 deletions(-) delete mode 100644 .github/workflows/ant-release.yml diff --git a/.github/workflows/ant-release.yml b/.github/workflows/ant-release.yml deleted file mode 100644 index 6fa4a4ce2..000000000 --- a/.github/workflows/ant-release.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Release - -on: - release: - types: [created] - -jobs: - call-workflow: - uses: JOSM/JOSMPluginAction/.github/workflows/ant.yml@v2 - with: - josm-revision: "r18877" - java-version: 17 - add-mapillary-keys: - runs-on: ubuntu - needs: call-workflow - steps: - - name: Get Mapillary jar - run: gh release download ${{ github.ref_name }} --pattern Mapillary.jar - - name: Add keys - run: | - cat < mapillary_api_keys.json - { - "MAPILLARY_CLIENT_ID": "${real_MAPILLARY_CLIENT_ID}", - "MAPILLARY_CLIENT_TOKEN": "${real_MAPILLARY_CLIENT_TOKEN}", - "MAPILLARY_CLIENT_SECRET": "${real_MAPILLARY_CLIENT_SECRET}" - } - EOF - zip Mapillary.jar mapillary_api_keys.json - - name: Upload Mapillary jar - run: gh release upload ${{ github.ref_name }} --clobber Mapillary.jar diff --git a/.github/workflows/ant.yml b/.github/workflows/ant.yml index 563dc424d..14e54efe7 100644 --- a/.github/workflows/ant.yml +++ b/.github/workflows/ant.yml @@ -21,4 +21,24 @@ jobs: with: josm-revision: ${{ matrix.josm-revision }} java-version: 17 + perform-revision-tagging: ${{ matrix.josm-revision == 'r18877' && github.repository == 'JOSM/Mapillary' && github.ref_type == 'branch' && github.ref_name == 'master' && github.event_name != 'schedule' && github.event_name != 'pull_request' }} + add-mapillary-keys: + runs-on: ubuntu + needs: call-workflow + if: needs.call-workflow.outputs.tag + steps: + - name: Get Mapillary jar + run: gh release download ${{ needs.call-workflow.outputs.tag }} --pattern Mapillary.jar + - name: Add keys + run: | + cat < mapillary_api_keys.json + { + "MAPILLARY_CLIENT_ID": "${real_MAPILLARY_CLIENT_ID}", + "MAPILLARY_CLIENT_TOKEN": "${real_MAPILLARY_CLIENT_TOKEN}", + "MAPILLARY_CLIENT_SECRET": "${real_MAPILLARY_CLIENT_SECRET}" + } + EOF + zip Mapillary.jar mapillary_api_keys.json + - name: Upload Mapillary jar + run: gh release upload ${{ needs.call-workflow.outputs.tag }} --clobber Mapillary.jar