-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.38 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
name: Release
on: [push, workflow_dispatch]
jobs:
release:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: https://registry.npmjs.org
- name: Install deps
run: yarn install --frozen-lockfile
- name: Build package
run: yarn build
- name: Get tag
uses: martinbeentjes/npm-get-version-action@master
id: get_tag
- name: Get Changelog Entry
id: get_changelog
uses: mindsers/changelog-reader-action@v2
with:
validation_depth: 10
version: ${{ steps.get_tag.outputs.current-version }}
- name: Create Release
uses: ncipollo/release-action@v1
with:
body: ${{ steps.get_changelog.outputs.changes }}
tag: ${{ steps.get_changelog.outputs.version }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}