-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (32 loc) · 893 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
35
36
37
38
name: Publish
on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4
with:
node-version: latest
registry-url: 'https://registry.npmjs.org'
cache: pnpm
- run: pnpm install
- run: pnpm run build
- run: pnpm publish --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Get Release Name
id: release_name
run: |
RELEASE_NAME=${{ github.ref }}
RELEASE_NAME=${RELEASE_NAME#refs/tags/v}
echo "name=${RELEASE_NAME}" >> "$GITHUB_OUTPUT"
- uses: softprops/action-gh-release@v2
with:
name: ${{ steps.release_name.outputs.name }}
body: 'draft'
draft: true