Skip to content

Commit

Permalink
👷 Add github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored and Freed-Wu committed Mar 28, 2024
1 parent 2cb65a8 commit 0efed3d
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
"on":
push:
paths-ignore:
- "**.md"
pull_request:
paths-ignore:
- "**.md"
workflow_dispatch:

# https://github.com/softprops/action-gh-release/issues/236
permissions:
contents: write

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest
registry-url: https://registry.npmjs.org
- name: Install dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install librime-dev libjson-c-dev librime1 libjson-c5
yarn
- name: Build
run: |
yarn pack
env:
NODE_ENV: production
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: "*.tgz"
- name: Publish
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
NODE_ENV: production
if: startsWith(github.ref, 'refs/tags/')
run: |
yarn publish
2 changes: 2 additions & 0 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
"<!@(pkg-config --cflags rime json-c)",
],
"ldflags": [
# https://stackoverflow.com/questions/45135/why-does-the-order-in-which-libraries-are-linked-sometimes-cause-errors-in-gcc/29457226#29457226
"-Wl,--start-group",
"<!@(pkg-config --libs rime json-c)",
]
}
Expand Down

0 comments on commit 0efed3d

Please sign in to comment.