-
-
Notifications
You must be signed in to change notification settings - Fork 109
37 lines (34 loc) · 1008 Bytes
/
release.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
name: Release & Publish to NPM
on:
pull_request:
push:
branches: [main]
env:
PNPM_CACHE_FOLDER: .pnpm-store
HUSKY: 0 # Bypass husky commit hook for CI
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
- name: Initialize Git User
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "[email protected]"
- name: Initialise the NPM config
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Install dependencies
run: pnpm install
- name: Release
run: pnpm release --ci --dry-run
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}