-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathchangelogithub.yml
More file actions
77 lines (77 loc) · 2.33 KB
/
changelogithub.yml
File metadata and controls
77 lines (77 loc) · 2.33 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Publish to npm
permissions: {}
on:
push:
tags:
- v*
jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 24
cache: npm
- run: npm ci --ignore-scripts
- run: npm test
build:
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
tarball: ${{ steps.pack.outputs.tarball }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 24
package-manager-cache: false
- run: npm ci --ignore-scripts
- run: npm run build
- run: npm version $TAG_NAME --git-tag-version=false
env:
TAG_NAME: ${{ github.ref_name }}
- id: pack
run: |-
TARBALL=$(npm pack)
echo "tarball=$TARBALL" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: tarball
path: ${{ steps.pack.outputs.tarball }}
publish:
needs:
- test
- build
runs-on: ubuntu-latest
permissions:
id-token: write
env:
TARBALL: ${{ needs.build.outputs.tarball }}
steps:
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
with:
name: tarball
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 24
package-manager-cache: false
- run: npm stage publish --provenance --access public --tag next $TARBALL
if: github.event.release.prerelease
env:
TARBALL: ${{ needs.build.outputs.tarball }}
- run: npm stage publish --provenance --access public $TARBALL
if: "!github.event.release.prerelease"
env:
TARBALL: ${{ needs.build.outputs.tarball }}
- name: Generate Change Log
run: npx changelogithub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}