mirror of https://github.com/WerWolv/ImHex.git
git: Add version to artifact names (#559)
* Version file test * change artifacts names * Release updated * Set release job name * set branch to the branch used to release * Set version for Windows Portable * git: New cache update (#558) * add CMakeCache.txt to cache * added workflow_dispatch to workflows * remove restore-keys from workflows * Separated cache * re-added restore-keys * put the version file for all OS * fix: In/Out parameters not working correctly when using the preprocessor * update submodules Co-authored-by: WerWolv <werwolv98@gmail.com>
This commit is contained in:
parent
8db2bdb6a7
commit
11c2f240a1
|
@ -103,7 +103,7 @@ jobs:
|
||||||
- name: ⬆️ Upload Portable ZIP
|
- name: ⬆️ Upload Portable ZIP
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: Windows Portable ZIP
|
name: Windows Portable
|
||||||
path: |
|
path: |
|
||||||
build/install/*
|
build/install/*
|
||||||
|
|
||||||
|
@ -238,6 +238,10 @@ jobs:
|
||||||
..
|
..
|
||||||
make -j 4 install DESTDIR=AppDir
|
make -j 4 install DESTDIR=AppDir
|
||||||
|
|
||||||
|
- name: 📜 Set version variable
|
||||||
|
run: |
|
||||||
|
echo "version=`cat build/version`" >> $GITHUB_ENV
|
||||||
|
|
||||||
#- name: 📦 Bundle Flatpak
|
#- name: 📦 Bundle Flatpak
|
||||||
# run: |
|
# run: |
|
||||||
# sudo apt install flatpak flatpak-builder
|
# sudo apt install flatpak flatpak-builder
|
||||||
|
@ -251,14 +255,14 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cp -r build/DEBIAN build/AppDir
|
cp -r build/DEBIAN build/AppDir
|
||||||
dpkg-deb --build build/AppDir
|
dpkg-deb --build build/AppDir
|
||||||
mv build/AppDir.deb imhex.deb
|
mv build/AppDir.deb imhex-${{env.version}}.deb
|
||||||
rm -rf build/AppDir/DEBIAN
|
rm -rf build/AppDir/DEBIAN
|
||||||
|
|
||||||
- name: 📦 Bundle AppImage
|
- name: 📦 Bundle AppImage
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
appimage-builder --recipe ../dist/AppImageBuilder.yml
|
appimage-builder --recipe ../dist/AppImageBuilder.yml
|
||||||
mv ImHex-AppImage-x86_64.AppImage ../imhex.AppImage
|
mv ImHex-AppImage-x86_64.AppImage ../imhex-${{env.version}}.AppImage
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
#- name: ⬆️ Upload Flatpak
|
#- name: ⬆️ Upload Flatpak
|
||||||
|
@ -272,13 +276,11 @@ jobs:
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: Linux DEB (Ubuntu 22.04)
|
name: Linux DEB (Ubuntu 22.04)
|
||||||
path: |
|
path: '*.deb'
|
||||||
imhex.deb
|
|
||||||
|
|
||||||
- name: ⬆️ Upload AppImage
|
- name: ⬆️ Upload AppImage
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: Linux AppImage
|
name: Linux AppImage
|
||||||
path: |
|
path: '*.AppImage'
|
||||||
imhex.AppImage
|
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,9 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
name: Release
|
||||||
|
env:
|
||||||
|
version: ${{ github.event.release.tag_name }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Get sources
|
- name: Get sources
|
||||||
|
@ -26,13 +29,28 @@ jobs:
|
||||||
with:
|
with:
|
||||||
github_token: ${{secrets.GITHUB_TOKEN}}
|
github_token: ${{secrets.GITHUB_TOKEN}}
|
||||||
workflow: build.yml
|
workflow: build.yml
|
||||||
branch: master
|
branch: ${{ github.event.release.target_commitish }}
|
||||||
workflow_conclusion: success
|
workflow_conclusion: success
|
||||||
skip_unpack: true
|
skip_unpack: true
|
||||||
|
|
||||||
|
- name: Unzip files when needed
|
||||||
|
run: |
|
||||||
|
for zipfile in ./*.zip
|
||||||
|
do
|
||||||
|
if [ `zipinfo -1 "$zipfile" | wc -l` -eq 1 ];
|
||||||
|
then
|
||||||
|
echo "unzipping $zipfile"
|
||||||
|
unzip "$zipfile"
|
||||||
|
rm "$zipfile"
|
||||||
|
else
|
||||||
|
echo "keeping $zipfile zipped"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: Rename Windows Portable Zip
|
||||||
|
run: mv "Windows Portable.zip" imhex-${{env.version}}-Windows-Portable.zip
|
||||||
|
|
||||||
- name: Upload everything to release
|
- name: Upload everything to release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
files: |
|
files: '*'
|
||||||
*.zip
|
|
||||||
*.tar.gz
|
|
||||||
|
|
|
@ -222,12 +222,16 @@ macro(createPackage)
|
||||||
install(FILES "$<TARGET_FILE:libimhex>" DESTINATION "${CMAKE_INSTALL_LIBDIR}")
|
install(FILES "$<TARGET_FILE:libimhex>" DESTINATION "${CMAKE_INSTALL_LIBDIR}")
|
||||||
downloadImHexPatternsFiles("./")
|
downloadImHexPatternsFiles("./")
|
||||||
elseif(UNIX AND NOT APPLE)
|
elseif(UNIX AND NOT APPLE)
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/dist/DEBIAN/control.in ${CMAKE_BINARY_DIR}/DEBIAN/control)
|
|
||||||
|
configure_file(${CMAKE_SOURCE_DIR}/dist/DEBIAN/control.in ${CMAKE_BINARY_DIR}/DEBIAN/control)
|
||||||
|
|
||||||
install(FILES ${CMAKE_SOURCE_DIR}/dist/imhex.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
|
install(FILES ${CMAKE_SOURCE_DIR}/dist/imhex.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
|
||||||
install(FILES ${CMAKE_SOURCE_DIR}/resources/icon.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps RENAME imhex.png)
|
install(FILES ${CMAKE_SOURCE_DIR}/resources/icon.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps RENAME imhex.png)
|
||||||
install(FILES "$<TARGET_FILE:libimhex>" DESTINATION "${CMAKE_INSTALL_LIBDIR}")
|
install(FILES "$<TARGET_FILE:libimhex>" DESTINATION "${CMAKE_INSTALL_LIBDIR}")
|
||||||
downloadImHexPatternsFiles("./")
|
downloadImHexPatternsFiles("./")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
write_file(version ${PROJECT_VERSION})
|
||||||
|
|
||||||
if (CREATE_BUNDLE)
|
if (CREATE_BUNDLE)
|
||||||
include(PostprocessBundle)
|
include(PostprocessBundle)
|
||||||
|
|
Loading…
Reference in New Issue