Changeset 17487 in josm for trunk/.github/workflows/ant.yml
- Timestamp:
- 2021-02-08T20:52:53+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/.github/workflows/ant.yml
r17373 r17487 24 24 josm_revision: ${{ steps.create_revision.outputs.josm_revision }} 25 25 josm_prerelease: ${{ steps.create_revision.outputs.josm_prerelease }} 26 josm_release_tag: ${{ steps.create_revision.outputs.josm_release_tag }} 26 27 steps: 27 28 - name: Checkout 28 29 uses: actions/checkout@v2 29 30 with: 30 fetch-depth: 3231 fetch-depth: 256 31 32 - name: Set revision env variable 32 33 id: create_revision … … 35 36 josm_revision="$(git log -1 --grep 'git-svn-id: https://josm.openstreetmap.de/svn/trunk@' --pretty=format:%B | tail -1 | sed -n 's%git-svn-id: https://josm.openstreetmap.de/svn/trunk@\([0-9]*\) [-0-9a-f]*%\1%p')" 36 37 if [[ "$josm_revision" == "$(curl --silent https://josm.openstreetmap.de/tested)" ]]; then 37 sed -i '/Is-Local-Build/d' resources/REVISION38 38 echo "josm_prerelease=false" >> $GITHUB_ENV 39 39 echo "::set-output name=josm_prerelease::false" 40 echo "josm_release=$josm_revision-tested" >> $GITHUB_ENV40 josm_release_tag=$josm_revision-tested 41 41 else 42 42 echo "josm_prerelease=true" >> $GITHUB_ENV 43 43 echo "::set-output name=josm_prerelease::true" 44 echo "josm_release=$josm_revision" >> $GITHUB_ENV44 josm_release_tag=$josm_revision 45 45 fi 46 46 echo "josm_revision=$josm_revision" >> $GITHUB_ENV 47 47 echo "::set-output name=josm_revision::$josm_revision" 48 echo "josm_release_tag=$josm_release_tag" >> $GITHUB_ENV 49 echo "::set-output name=josm_release_tag::$josm_release_tag" 48 50 - name: Create release 49 51 id: create_release … … 52 54 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token 53 55 with: 54 tag_name: ${{ env.josm_release }}55 release_name: JOSM.app release ${{ env.josm_release }}56 tag_name: ${{ env.josm_release_tag }} 57 release_name: JOSM.app release ${{ env.josm_release_tag }} 56 58 body: | 57 JOSM.app release ${{ env.josm_release }}59 JOSM.app release ${{ env.josm_release_tag }} 58 60 draft: false 59 61 prerelease: ${{ env.josm_prerelease }} … … 84 86 uses: actions/checkout@v2 85 87 with: 86 fetch-depth: 3288 fetch-depth: 256 87 89 - name: Cache 88 90 uses: actions/cache@v2.0.0 … … 120 122 defaults write net.pornel.ImageOptim PngOutEnabled 1 121 123 /Applications/ImageOptim.app/Contents/MacOS/ImageOptim resources/images 124 - name: Set Is-Local-Build 125 if: ${{ ! needs.createrelease.outputs.josm_prerelease }} 126 run: | 127 ant create-revision 128 sed -i.bak '/Is-Local-Build/d' resources/REVISION 122 129 - name: Build with Ant 123 130 # Disables errorprone for Java 16 … … 130 137 fi 131 138 - name: Upload jar 132 if: ${{ always() && matrix.headless }} 139 # Only run on matrix.headless to avoid double jars. They should be the same jars. 140 # uses `gh release upload` to avoid https://github.com/actions/upload-release-asset/issues/69 141 if: ${{ always() && matrix.headless == 'true' }} 133 142 id: upload-jar 143 env: 144 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 134 145 uses: actions/upload-release-asset@v1 135 env:136 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}137 146 with: 138 147 upload_url: ${{ needs.createrelease.outputs.upload_url }} # This pulls from the CREATE RELEASE job above, referencing its ID to get its outputs object, which include a `upload_url`. … … 140 149 asset_name: JOSM-${{ runner.os}}-java${{ matrix.java }}-${{ needs.createrelease.outputs.josm_revision }}.jar 141 150 asset_content_type: application/java-archive 151 # run: | 152 # cp dist/josm-custom.jar JOSM-${{ runner.os}}-java${{ matrix.java }}-${{ needs.createrelease.outputs.josm_revision }}.jar 153 # gh release upload ${{ needs.createrelease.outputs.josm_release_tag }} JOSM-${{ runner.os}}-java${{ matrix.java }}-${{ needs.createrelease.outputs.josm_revision }}.jar 142 154 - name: Test with Ant, headless ${{ matrix.headless }} 143 155 if: ${{ needs.createrelease.outputs.josm_prerelease }} … … 158 170 name: Ant reports for JOSM ${{ needs.createrelease.outputs.josm_revision }} on java ${{ matrix.java }} on ${{ matrix.os }} with headless=${{ matrix.headless }} 159 171 path: test/report/*.txt 172 - name: Publish Test Report with junit-report-annotations-action 173 uses: ashley-taylor/junit-report-annotations-action@1.3 174 if: always() 175 with: 176 access-token: ${{ secrets.GITHUB_TOKEN }} 177 path: 'test/report/TEST*.xml' 178 - name: Publish Test Report with action-junit-report 179 if: always() 180 uses: mikepenz/action-junit-report@v1 181 with: 182 report_paths: 'test/report/TEST*.xml' 183 github_token: ${{ secrets.GITHUB_TOKEN }} 160 184 - name: Build and package for macOS 161 185 if: ${{ runner.os == 'macos' && always() }}
Note:
See TracChangeset
for help on using the changeset viewer.