-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (39 loc) · 1.02 KB
/
acion-publish-package.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
42
43
44
45
name: GitHub Actions Publish package
on:
pull_request:
branches:
- main
types:
- closed
jobs:
publish-package:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
- uses: actions/setup-node/@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Config git
run: |
git config --local user.email "[email protected]"
git config --local user.name "drdevelop"
- name: install pnpm
uses: pnpm/action-setup@v2
with:
version: 7
- name: install dependencies
run: pnpm install
- name: Release
run: pnpm run release
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
GH_TOKEN: ${{ secrets.ACCESS_TOKEN }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.ACCESS_TOKEN }}