Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions .github/workflows/latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,27 @@ jobs:
- name: Build nodegui
run: npx tsc
- name: Archive using npm pack
run: npm --no-git-tag-version version 1.0.0-master && npm pack
run: npm --no-git-tag-version version 0.0.0-latest-master && npm pack
- uses: actions/upload-artifact@v1
with:
name: latest-release
path: nodegui-nodegui-1.0.0-master.tgz
path: nodegui-nodegui-0.0.0-latest-master.tgz
- uses: nodegui/create-release@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
code: latest-master
code: v0.0.0-latest-master
name: Latest Master Release
body: >
Latest auto release corresponding to commit ${{github.sha}} 🔥.
To install do:
`npm install https://github.com/nodegui/nodegui/releases/download/latest-master/nodegui-master.tgz`
`npm install https://github.com/nodegui/nodegui/releases/download/v0.0.0-latest-master/nodegui-master.tgz`
assets: >
nodegui-nodegui-1.0.0-master.tgz:nodegui-master.tgz:application/tar+gzip
nodegui-nodegui-0.0.0-latest-master.tgz:nodegui-master.tgz:application/tar+gzip
recreate: true
prerelease: true
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
repository: nodegui/nodegui
event-type: on-demand-build
client-payload: '{"ref": "${{ github.ref }}","tag": "v0.0.0-latest-master"}'
35 changes: 35 additions & 0 deletions .github/workflows/prebuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
on:
repository_dispatch:
types: [on-demand-build]
release:
types: [published, created, prereleased]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- uses: actions/setup-node@master
with:
node-version: '13.x'
- name: Install deps
run: npm install
env:
SKIP_BUILD: 1
- name: Change version if master
if: contains(github.event.client_payload.tag, '0.0.0-latest-master')
run: npm --no-git-tag-version version 0.0.0-latest-master
- name: Prebuild binary
run: npm run prebuild:build
- name: Release
uses: softprops/action-gh-release@master
with:
files: prebuilds/@nodegui/*.tar.gz
tag_name: ${{ github.event.release.tag_name || github.event.client_payload.tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ dist
coverage
.DS_Store
/.idea/
/prebuilds
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ target_link_libraries(${CORE_WIDGETS_ADDON} PRIVATE

if (WIN32)
target_compile_definitions(${CORE_WIDGETS_ADDON} PRIVATE
ENABLE_DLL_EXPORT
ENABLE_DLL_EXPORT=1
)
target_compile_options(${CORE_WIDGETS_ADDON} PRIVATE "/MP4")

Expand Down
7 changes: 7 additions & 0 deletions config/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ function(AddCommonConfig addonName)
cxx_variadic_templates
cxx_variable_templates
)

if(napi_build_version)
target_compile_definitions(${addonName} PRIVATE
NAPI_VERSION=${napi_build_version}
)
endif()

if (WIN32)
target_compile_definitions(${addonName} PRIVATE
ENUM_BITFIELDS_NOT_SUPPORTED
Expand Down
Loading