generated from Namchee/liby
-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (31 loc) · 953 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
34
name: Publish to NPM for each push to master and pull request (canary)
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
publish:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
steps:
- name: Checkout to repository
uses: actions/checkout@v4
- run: git fetch --unshallow --tags
- uses: pnpm/action-setup@v2.4.0
with:
version: 8.9.0
- name: Install dependencies
run: pnpm install
- name: Lint and test the files
run: pnpm run lint:fix & pnpm run test
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
pnpm build
pnpx auto shipit