-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (37 loc) · 1.03 KB
/
release.yml
File metadata and controls
40 lines (37 loc) · 1.03 KB
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
# Simple workflow for deploying static content to GitHub Pages
name: Release @react-elf/* to npmjs
on:
# Runs on pushes targeting the default branch
release:
types: [published]
env:
PNPM_CACHE_FOLDER: .pnpm-store
jobs:
# Single deploy job since we're just deploying
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 6.0.2
- name: Install
run: pnpm install
- name: Setup npmrc
run: |
cat << EOF > "$HOME/.npmrc"
email=cyberuls@gmail.com
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Build for library
run: pnpm lib:build
- name: Publish to npm
run: pnpm release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}