Skip to content

👷 Add github workflow #1

👷 Add github workflow

👷 Add github workflow #1

Workflow file for this run

---
"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