Skip to content

Commit

Permalink
Release workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
wangkaidev committed Mar 25, 2024
2 parents c20f00f + 792714c commit 02937ca
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 15 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'release/v*' # Push events to matching v*, i.e. v1.0, v20.15.10

name: Create Release

jobs:
build:
name: Build
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=RelWithDebInfo
- name: Build and package
run: cmake --build build --config RelWithDebInfo --target package
- name: Upload ZIP as Artifact
uses: actions/upload-artifact@v2
with:
name: easy_debug_view-zip
path: ${{github.workspace}}/build/easy_debug_view.zip

release:
name: Release
runs-on: windows-latest
needs: build
steps:
- name: Download ZIP Artifact
uses: actions/download-artifact@v2
with:
name: easy_debug_view-zip
path: .

- name: Release
uses: softprops/action-gh-release@v2
with:
draft: true
files: easy_debug_view.zip
22 changes: 7 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,15 @@ add_executable(${TARGET_NAME} ${SOURCE_FILES})

set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT ${TARGET_NAME})

install(TARGETS ${TARGET_NAME} DESTINATION .)
install(FILES ${CMAKE_SOURCE_DIR}/LICENSE DESTINATION .)
install(FILES ${CMAKE_SOURCE_DIR}/README.md DESTINATION .)
install(FILES $<TARGET_PDB_FILE:${TARGET_NAME}> DESTINATION / OPTIONAL COMPONENT symbols)

set(CPACK_PACKAGE_FILE_NAME "easy_debug_view")
set(CPACK_PACKAGE_NAME "easy_debug_view")
set(CPACK_PACKAGE_DESCRIPTION "Easy and fast debug output viewer for Windows")
set(CPACK_COMPONENTS_GROUPING ONE_PER_GROUP)
SET(CPACK_ARCHIVE_COMPONENT_INSTALL ON)

set(CPACK_GENERATOR "ZIP")

get_cmake_property(CPACK_COMPONENTS_ALL COMPONENTS)
list(REMOVE_ITEM CPACK_COMPONENTS_ALL "Unspecified")

include(CPack)

cpack_add_component(easy_debug_view
DISPLAY_NAME "easy_debug_view"
DESCRIPTION "Easy debug view package"
)
cpack_add_component(symbols
DISPLAY_NAME "Symbols"
DESCRIPTION "Symbols package"
)
include(CPack)
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
# easy-debug-view
Simple and fast debug output viewer for Windows.

## Build
### Configure and build using CMake
```console
cmake -S . -B build
cmake --build build --config RelWithDebInfo --target ALL_BUILD
```
### Configure, build and package using CMake
cmake -S . -B build
cmake --build build --config RelWithDebInfo --target package

0 comments on commit 02937ca

Please sign in to comment.