-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (40 loc) · 1.19 KB
/
release.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
46
47
48
49
50
51
52
name: Release
on:
release:
types:
- published
env:
FORCE_COLOR: 3
NODE_VERSION: 22
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Get version from tag
id: tag_name
run: echo "current_version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Check out repository
uses: actions/[email protected]
- name: Set up Node.js
uses: actions/[email protected]
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: "https://registry.npmjs.org"
- name: Get changelog entry
uses: mindsers/[email protected]
id: changelog_reader
with:
version: ${{ steps.tag_name.outputs.current_version }}
- name: Update release with changelog contents
uses: softprops/[email protected]
id: release_updater
with:
body: ${{ steps.changelog_reader.outputs.changes }}
- run: npm ci
- run: npm test
- run: npm whoami && npm --ignore-scripts publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}