-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: build with CMake and release with semantic-release
BREAKING CHANGE: Drops Windows XP support
- Loading branch information
1 parent
824746d
commit 53a07d8
Showing
13 changed files
with
182 additions
and
264 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: windows-2022 | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
fetch-depth: 1 | ||
- name: Build | ||
run: | | ||
cmake -E make_directory build/x64 | ||
cmake -E make_directory build/Win32 | ||
cd build/x64 | ||
cmake -A x64 ../../ | ||
cmake --build . --config RelWithDebInfo | ||
cd ../../build/Win32 | ||
cmake -A Win32 ../../ | ||
cmake --build . --config RelWithDebInfo | ||
- name: Copy to dist | ||
run: | | ||
cmake -E make_directory dist | ||
cmake -E copy build/x64/RelWithDebInfo/rcedit.exe dist/rcedit-x64.exe | ||
cmake -E copy build/Win32/RelWithDebInfo/rcedit.exe dist/rcedit-x86.exe | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | ||
with: | ||
name: dist | ||
path: dist/ | ||
|
||
release: | ||
name: Release | ||
runs-on: windows-2022 | ||
needs: build | ||
if: github.ref == 'refs/heads/master' | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout | ||
id: checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | ||
with: | ||
name: dist | ||
path: dist/ | ||
- name: Print help | ||
run: | | ||
dist/rcedit-x86.exe -h | ||
dist/rcedit-x64.exe -h | ||
- run: npm install -g [email protected] [email protected] | ||
- run: npx [email protected] --dry-run | ||
id: get-next-version | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Stamp version | ||
if: steps.get-next-version.outputs.new-release-published == 'true' | ||
run: | | ||
set -eo pipefail | ||
dist/rcedit-x64.exe dist/rcedit-x86.exe --set-product-version $VERSION --set-file-version $VERSION | ||
dist/rcedit-x86.exe -h | grep -q Rcedit v$VERSION | ||
dist/rcedit-x86.exe dist/rcedit-x64.exe --set-product-version $VERSION --set-file-version $VERSION | ||
dist/rcedit-x64.exe -h | grep -q Rcedit v$VERSION | ||
env: | ||
VERSION: ${{ steps.get-next-version.outputs.new-release-version }} | ||
- name: Run semantic release | ||
run: npx [email protected] --dry-run | ||
if: steps.get-next-version.outputs.new-release-published == 'true' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
Default/ | ||
ipch/ | ||
build/ | ||
|
||
*.swp | ||
*.sdf | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"plugins": [ | ||
"semantic-release-export-data", | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
[ | ||
"@semantic-release/github", | ||
{ | ||
"assets": [ | ||
{ "path": "dist/rcedit-x64.exe" }, | ||
{ "path": "dist/rcedit-x86.exe" } | ||
] | ||
} | ||
] | ||
], | ||
"branches": [ "master" ] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
cmake_minimum_required(VERSION 3.15) | ||
|
||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded") | ||
|
||
# /Ox, full optimization | ||
# /Os, favour small code | ||
add_compile_options(/Ox /Os) | ||
|
||
project(rcedit) | ||
|
||
add_executable(rcedit src/main.cc src/rescle.cc src/rcedit.rc) | ||
target_link_libraries(rcedit version.lib) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.