Skip to content

Commit e5eed6a

Browse files
Merge pull request #537 from pierre-guillou/package_release_tags
Packaging: Add tag name to release assets
2 parents 83741e7 + 7a584fa commit e5eed6a

File tree

2 files changed

+23
-30
lines changed

2 files changed

+23
-30
lines changed

.github/workflows/main.yml

Lines changed: 22 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ jobs:
411411
set PV_DIR=%ProgramFiles%\TTK-ParaView
412412
set TTK_DIR=%ProgramFiles%\TTK
413413
set CMAKE_PREFIX_PATH=%TTK_DIR%\lib\cmake;%PV_DIR%\lib\cmake
414-
set PATH=%PATH%;%PV_DIR%\bin;%TTK_DIR%\bin;%TTK_DIR%\bin\ttk
414+
set PATH=%PATH%;%PV_DIR%\bin;%TTK_DIR%\bin
415415
:: base layer
416416
cd %GITHUB_WORKSPACE%\examples\c++
417417
mkdir build
@@ -437,7 +437,7 @@ jobs:
437437
export TTK_BIN="/c/Program Files/TTK/bin"
438438
export CONDA_ROOT="/c/Miniconda"
439439
export PV_PLUGIN_PATH="$TTK_BIN/plugins"
440-
export PATH="$PATH:$PV_PLUGIN_PATH:$PV_BIN:$TTK_BIN:$TTK_BIN/ttk"
440+
export PATH="$PATH:$PV_BIN:$TTK_BIN"
441441
export PYTHONPATH="$PV_BIN/Lib/site-packages:$TTK_BIN/Lib/site-packages:$CONDA_ROOT/Lib"
442442
# pure python
443443
cd $GITHUB_WORKSPACE/examples/python
@@ -467,41 +467,33 @@ jobs:
467467
uses: actions/download-artifact@v2
468468

469469
- name: Upload Ubuntu Bionic .deb as Release Asset
470-
uses: actions/upload-release-asset@v1
471-
env:
472-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
470+
uses: svenstaro/upload-release-action@v2
473471
with:
474-
upload_url: ${{ steps.create_release.outputs.upload_url }}
475-
asset_path: ttk-ubuntu-18.04.deb/ttk-ubuntu-18.04.deb
476-
asset_name: ttk-ubuntu-18.04.deb
477-
asset_content_type: application/vnd.debian.binary-package
472+
repo_token: ${{ secrets.GITHUB_TOKEN }}
473+
tag: ${{ github.ref }}
474+
file: ttk-ubuntu-18.04.deb/ttk-ubuntu-18.04.deb
475+
asset_name: ttk-$tag-ubuntu-18.04.deb
478476

479477
- name: Upload Ubuntu Focal .deb as Release Asset
480-
uses: actions/upload-release-asset@v1
481-
env:
482-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
478+
uses: svenstaro/upload-release-action@v2
483479
with:
484-
upload_url: ${{ steps.create_release.outputs.upload_url }}
485-
asset_path: ttk-ubuntu-20.04.deb/ttk-ubuntu-20.04.deb
486-
asset_name: ttk-ubuntu-20.04.deb
487-
asset_content_type: application/vnd.debian.binary-package
480+
repo_token: ${{ secrets.GITHUB_TOKEN }}
481+
tag: ${{ github.ref }}
482+
file: ttk-ubuntu-20.04.deb/ttk-ubuntu-20.04.deb
483+
asset_name: ttk-$tag-ubuntu-20.04.deb
488484

489485
- name: Upload macOS .pkg as Release Asset
490-
uses: actions/upload-release-asset@v1
491-
env:
492-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
486+
uses: svenstaro/upload-release-action@v2
493487
with:
494-
upload_url: ${{ steps.create_release.outputs.upload_url }}
495-
asset_path: ttk.pkg/ttk.pkg
496-
asset_name: ttk.pkg
497-
asset_content_type: application/x-newton-compatible-pkg
488+
repo_token: ${{ secrets.GITHUB_TOKEN }}
489+
tag: ${{ github.ref }}
490+
file: ttk.pkg/ttk.pkg
491+
asset_name: ttk-$tag.pkg
498492

499493
- name: Upload Windows .exe as Release Asset
500-
uses: actions/upload-release-asset@v1
501-
env:
502-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
494+
uses: svenstaro/upload-release-action@v2
503495
with:
504-
upload_url: ${{ steps.create_release.outputs.upload_url }}
505-
asset_path: ttk.exe/ttk.exe
506-
asset_name: ttk.exe
507-
asset_content_type: application/vnd.microsoft.portable-executable
496+
repo_token: ${{ secrets.GITHUB_TOKEN }}
497+
tag: ${{ github.ref }}
498+
file: ttk.exe/ttk.exe
499+
asset_name: ttk-$tag.exe

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Hidden files
22
.*
33
!.gitignore
4+
!.github
45

56
# Temporary and backup files
67
\#*\#

0 commit comments

Comments
 (0)