-
-
Notifications
You must be signed in to change notification settings - Fork 10
42 lines (33 loc) · 1.02 KB
/
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
34
35
36
37
38
39
40
41
name: publish
# Controls when the workflow will run
on:
push:
branches: [master]
workflow_dispatch:
jobs:
publish:
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Set up Node.js
uses: actions/[email protected]
with:
node-version: 20.x
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Set up Git user
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor}}@users.noreply.github.com"
- name: "Setup npm" # Add our registry to npm config
run: | # Custom action
npm set "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}"
- name: Run lerna publish
run: npx lerna publish minor -y
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}