-
Notifications
You must be signed in to change notification settings - Fork 90
33 lines (32 loc) · 994 Bytes
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: publish to npm
on:
release:
types: [published]
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
registry-url: https://registry.npmjs.org/
cache: 'yarn'
- name: Check release validity
run: sh .github/scripts/check-release.sh
- name: Check tag format
run: sh .github/scripts/check-tag-format.sh "${{ github.event.release.prerelease }}"
- name: Install dependencies
run: yarn install
- name: Build meilisearch-js
run: yarn build
- name: Publish with latest tag
if: '!github.event.release.prerelease'
run: npm publish .
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Publish with beta tag
if: 'github.event.release.prerelease'
run: npm publish . --tag beta
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}