[pre-commit.ci] pre-commit autoupdate #293
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
--- | |
'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 | |
- name: Enable corepack | |
run: | | |
corepack enable | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
registry-url: https://registry.npmjs.org | |
cache: 'yarn' | |
- 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: | | |
npm publish |