|
34 | 34 | path: |
|
35 | 35 | *.tar.*
|
36 | 36 | *.sum
|
| 37 | +
|
| 38 | + # Release |
| 39 | + - name: Extract tag |
| 40 | + if: | |
| 41 | + startsWith(github.ref, 'refs/tags/') && matrix.image == 'debian-10' |
| 42 | + id: tag |
| 43 | + run: | |
| 44 | + tag=$(echo ${{ github.ref }} | sed -e 's,^refs/tags/,,') |
| 45 | + echo ::set-output name=name::${tag} |
| 46 | + - uses: actions/setup-ruby@v1 |
| 47 | + if: | |
| 48 | + startsWith(github.ref, 'refs/tags/') && matrix.image == 'debian-10' |
| 49 | + - name: Extract the news for the current release |
| 50 | + if: | |
| 51 | + startsWith(github.ref, 'refs/tags/') && matrix.image == 'debian-10' |
| 52 | + run: | |
| 53 | + ruby extract-news.rb ${{ steps.tag.outputs.name }} | tee news-current.md |
| 54 | + - uses: actions/create-release@v1 |
| 55 | + if: | |
| 56 | + startsWith(github.ref, 'refs/tags/') && matrix.image == 'debian-10' |
| 57 | + id: create-release |
| 58 | + env: |
| 59 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 60 | + with: |
| 61 | + tag_name: ${{ github.ref }} |
| 62 | + release_name: Release ${{ steps.tag.outputs.name }} |
| 63 | + body_path: news-current.md |
| 64 | + - uses: actions/upload-release-asset@v1 |
| 65 | + if: | |
| 66 | + startsWith(github.ref, 'refs/tags/') && matrix.image == 'debian-10' |
| 67 | + env: |
| 68 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 69 | + with: |
| 70 | + upload_url: ${{ steps.create-release.outputs.upload_url }} |
| 71 | + asset_path: libgcroots-${{ steps.tag.outputs.name }}.gz |
| 72 | + asset_name: libgcroots-${{ steps.tag.outputs.name }}.gz |
| 73 | + asset_content_type: application/gzip |
| 74 | + - uses: actions/upload-release-asset@v1 |
| 75 | + if: | |
| 76 | + startsWith(github.ref, 'refs/tags/') && matrix.image == 'debian-10' |
| 77 | + env: |
| 78 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 79 | + with: |
| 80 | + upload_url: ${{ steps.create-release.outputs.upload_url }} |
| 81 | + asset_path: libgcroots-${{ steps.tag.outputs.name }}.bz2 |
| 82 | + asset_name: libgcroots-${{ steps.tag.outputs.name }}.bz2 |
| 83 | + asset_content_type: application/x-bzip2 |
| 84 | + - uses: actions/upload-release-asset@v1 |
| 85 | + if: | |
| 86 | + startsWith(github.ref, 'refs/tags/') && matrix.image == 'debian-10' |
| 87 | + env: |
| 88 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 89 | + with: |
| 90 | + upload_url: ${{ steps.create-release.outputs.upload_url }} |
| 91 | + asset_path: libgcroots-${{ steps.tag.outputs.name }}.sum |
| 92 | + asset_name: libgcroots-${{ steps.tag.outputs.name }}.sum |
| 93 | + asset_content_type: text/plain |
0 commit comments