-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (28 loc) · 818 Bytes
/
publish.yml
File metadata and controls
36 lines (28 loc) · 818 Bytes
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
34
35
36
name: Publish to npm
on:
push:
tags:
- "**"
jobs:
publish:
runs-on: ubuntu-latest
environment: npm-publish
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: "main" # Replace with your branch name
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
- name: Install dependencies
run: yarn --immutable
- name: Build eslint-plugin
run: yarn workspace @bam.tech/eslint-plugin build
- name: Set up .npmrc file
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Publish to npm
run: npx lerna publish from-package --no-private --yes
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}