From 7a584fa1bd30eb5bec1070e5ba265e364c47ccdc Mon Sep 17 00:00:00 2001 From: Pierre Guillou Date: Fri, 20 Nov 2020 10:36:48 +0100 Subject: [PATCH] [GHActions] Use upload-release-action to add tag name to assets --- .github/workflows/main.yml | 48 ++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 28 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a6441c26e6..aeacd937f2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -467,41 +467,33 @@ jobs: uses: actions/download-artifact@v2 - name: Upload Ubuntu Bionic .deb as Release Asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: svenstaro/upload-release-action@v2 with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ttk-ubuntu-18.04.deb/ttk-ubuntu-18.04.deb - asset_name: ttk-ubuntu-18.04.deb - asset_content_type: application/vnd.debian.binary-package + repo_token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.ref }} + file: ttk-ubuntu-18.04.deb/ttk-ubuntu-18.04.deb + asset_name: ttk-$tag-ubuntu-18.04.deb - name: Upload Ubuntu Focal .deb as Release Asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: svenstaro/upload-release-action@v2 with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ttk-ubuntu-20.04.deb/ttk-ubuntu-20.04.deb - asset_name: ttk-ubuntu-20.04.deb - asset_content_type: application/vnd.debian.binary-package + repo_token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.ref }} + file: ttk-ubuntu-20.04.deb/ttk-ubuntu-20.04.deb + asset_name: ttk-$tag-ubuntu-20.04.deb - name: Upload macOS .pkg as Release Asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: svenstaro/upload-release-action@v2 with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ttk.pkg/ttk.pkg - asset_name: ttk.pkg - asset_content_type: application/x-newton-compatible-pkg + repo_token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.ref }} + file: ttk.pkg/ttk.pkg + asset_name: ttk-$tag.pkg - name: Upload Windows .exe as Release Asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: svenstaro/upload-release-action@v2 with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ttk.exe/ttk.exe - asset_name: ttk.exe - asset_content_type: application/vnd.microsoft.portable-executable + repo_token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.ref }} + file: ttk.exe/ttk.exe + asset_name: ttk-$tag.exe