-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (37 loc) · 1.08 KB
/
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
39
40
41
42
43
44
name: Publish Package
on:
push:
tags:
- "v*"
branches:
- main
jobs:
publish:
# if: github.event.repository.fork == false
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
environment: Release
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set node version to 22
uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://registry.npmjs.org/
cache: npm
- name: Install
run: npm ci
- name: Build
run: npm run package
- name: Publish to npm
run: npm run publish-ci ${{ github.ref_name }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# - name: Generate Changelog
# run: npx changelogithub
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}