Skip to content

Commit

Permalink
Update Makefile and build CI file
Browse files Browse the repository at this point in the history
  • Loading branch information
kikuchan committed Feb 15, 2024
1 parent a800b77 commit c5cb2bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
20 changes: 2 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,13 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install packages
run: sudo apt-get install build-essential mingw-w64 clang

- name: Set Tag Name
id: set_tag
run: echo "::set-output name=tag_name::${GITHUB_REF#refs/tags/}"

- name: Build for Windows
run: make win32

#- name: Build for Wasm
# run: make wasm

- name: Create Release
id: create_release
uses: actions/create-release@v1
Expand All @@ -36,29 +29,20 @@ jobs:
release_name: ${{ steps.set_tag.outputs.tag_name }}
draft: false
prerelease: false

- name: Upload Release Assets
id: upload-release-assets
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/win32/*.exe
# asset_name: *
asset_content_type: application/octet-stream

asset_path: ./build/win32/qrean.zip
asset_name: qrean-${{ steps.set_tag.outputs.tag_name }}.zip
- name: Publish package to NPM
- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org/
#- uses: pnpm/action-setup@v2
# with:
# version: 8
#- run: pnpm i --frozen-lockfile --strict-peer-dependencies
#- run: pnpm run build
#- run: pnpm run test
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dist: wasm
git show :library.json | jq '.version="$(shell jq -r .version package.json)"' > library.json

win32:
@BUILDDIR=$(abspath ./build/win32) CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar NO_SHLIB=1 DLL=1 CFLAGS="$(CFLAGS)" $(MAKE) clean cli
@BUILDDIR=$(abspath ./build/win32) CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar NO_SHLIB=1 DLL=1 CFLAGS="$(CFLAGS)" $(MAKE) clean cli && (cd build/win32; zip qrean.zip qrean*.exe)

test: cli
@LD_LIBRARY_PATH=$(BUILDDIR) BUILDDIR=$(BUILDDIR) CFLAGS="$(CFLAGS)" $(MAKE) -C tests

0 comments on commit c5cb2bc

Please sign in to comment.