-
Notifications
You must be signed in to change notification settings - Fork 2
32 lines (29 loc) · 791 Bytes
/
release.yml
File metadata and controls
32 lines (29 loc) · 791 Bytes
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
name: Create Relase & Publish Package
on:
push:
tags:
- 'v*'
env:
NODE_VERSION: 16
jobs:
build:
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/github-script@v6
with:
script: |
github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: '${{ github.ref }}',
name: 'Release ${{ github.ref_name }}'
})
- uses: aboutbits/github-actions-node/setup-and-install@v1
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}