@@ -318,7 +318,7 @@ jobs:
318318 needs : [test, test_bootstrapped, community_build, test_sbt, test_java11]
319319 if : github.event_name == 'push' &&
320320 startsWith(github.event.ref, 'refs/tags/') &&
321- !startsWith(github.ref, 'sbt-dotty-')
321+ !startsWith(github.event. ref, 'refs/tags/ sbt-dotty-')
322322
323323 env :
324324 RELEASEBUILD : yes
@@ -363,6 +363,7 @@ jobs:
363363 ./project/scripts/sbt dist-bootstrapped/packArchive
364364 sha256sum dist-bootstrapped/target/dotty-* > dist-bootstrapped/target/sha256sum.txt
365365 ./project/scripts/sbtPublish ";project dotty-bootstrapped ;publishSigned ;sonatypeBundleRelease"
366+ echo "::set-env name=RELEASE_TAG::${GITHUB_REF#*refs/tags/}"
366367
367368 - name : Create GitHub Release
368369 id : create_gh_release
@@ -374,16 +375,16 @@ jobs:
374375 release_name : ${{ github.ref }}
375376 body :
376377 draft : false
377- prerelease : ${{ endsWith(github.ref , 'RC1 ') }}
378+ prerelease : ${{ contains(env.RELEASE_TAG , 'RC ') }}
378379
379380 - name : Upload zip archive to GitHub Release
380381 uses : actions/upload-release-asset@v1
381382 env :
382383 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
383384 with :
384385 upload_url : ${{ steps.create_gh_release.outputs.upload_url }}
385- asset_path : ./dist-bootstrapped/target/dotty-${{ github.ref }}.zip
386- asset_name : dotty-${{ github.ref }}.zip
386+ asset_path : ./dist-bootstrapped/target/dotty-${{ env.RELEASE_TAG }}.zip
387+ asset_name : dotty-${{ env.RELEASE_TAG }}.zip
387388 asset_content_type : application/zip
388389
389390 - name : Upload tar.gz archive to GitHub Release
@@ -392,8 +393,8 @@ jobs:
392393 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
393394 with :
394395 upload_url : ${{ steps.create_gh_release.outputs.upload_url }}
395- asset_path : ./dist-bootstrapped/target/dotty-${{ github.ref }}.tar.gz
396- asset_name : dotty-${{ github.ref }}.tar.gz
396+ asset_path : ./dist-bootstrapped/target/dotty-${{ env.RELEASE_TAG }}.tar.gz
397+ asset_name : dotty-${{ env.RELEASE_TAG }}.tar.gz
397398 asset_content_type : application/gzip
398399
399400 - name : Upload SHA256 sum of the release artefacts to GitHub Release
@@ -412,7 +413,7 @@ jobs:
412413 needs : [publish_release]
413414 if : github.event_name == 'push' &&
414415 startsWith(github.event.ref, 'refs/tags/') &&
415- !startsWith(github.ref, 'sbt-dotty-')
416+ !startsWith(github.event. ref, 'refs/tags/ sbt-dotty-')
416417
417418 env :
418419 RELEASEBUILD : yes
@@ -460,8 +461,7 @@ jobs:
460461 container : akmetiuk/dotty:2020-02-12
461462 needs : [test, test_bootstrapped, community_build, test_sbt, test_java11]
462463 if : github.event_name == 'push' &&
463- startsWith(github.event.ref, 'refs/tags/') &&
464- startsWith(github.ref, 'sbt-dotty-')
464+ startsWith(github.event.ref, 'refs/tags/sbt-dotty-')
465465
466466 env :
467467 RELEASEBUILD : yes
0 commit comments