Skip to content

fix(ci): publish flow #20

fix(ci): publish flow

fix(ci): publish flow #20

Workflow file for this run

---
name: Publish
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "npm"
cache-dependency-path: "package-lock.json"
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Archive server-build artifacts
uses: actions/upload-artifact@v4
with:
name: server_build
path: |
pkg/server/cli.js
retention-days: 1
- name: Archive tree-sitter-build artifacts
uses: actions/upload-artifact@v4
with:
name: tree_sitter_build
path: |
pkg/tree-sitter/grammar.js
pkg/tree-sitter/binding.gyp
pkg/tree-sitter/src/
pkg/tree-sitter-graphql/grammar.js
pkg/tree-sitter-graphql/binding.gyp
pkg/tree-sitter-graphql/src/
retention-days: 1
npm-publish-server:
name: Publish Server
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
registry-url: "https://registry.npmjs.org"
- name: Download server-build artifacts
uses: actions/download-artifact@v4
with:
name: server_build
path: pkg/server/
- name: Publish server
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --workspace @mistweaverco/kulala-ls
npm-publish-tree-sitter-kulala:
name: "Publish Tree-sitter: kulala"
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
registry-url: "https://registry.npmjs.org"
- name: Download tree-sitter-build artifacts
uses: actions/download-artifact@v4
with:
name: tree_sitter_build
path: pkg/tree-sitter/
- name: Publish tree-sitter
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm publish --access public \
--workspace @mistweaverco/tree-sitter-kulala
npm-publish-tree-sitter-graphql:
name: "Publish Tree-sitter: graphql"
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
registry-url: "https://registry.npmjs.org"
- name: Download tree-sitter-build artifacts
uses: actions/download-artifact@v4
with:
name: tree_sitter_build
path: pkg/tree-sitter-graphql/
- name: Publish tree-sitter
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm publish --access public \
--workspace @mistweaverco/tree-sitter-graphql