forked from aragon/gov-ui-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (42 loc) · 1.3 KB
/
library-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
45
name: Library Publish
on:
push:
tags:
- "*"
env:
NODE_VERSION: 16
NODE_CACHE: "yarn"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Setup Node
uses: actions/[email protected]
with:
node-version: ${{ env.NODE_VERSION }}
cache: ${{ env.NODE_CACHE }}
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Get package version
id: package-version
uses: martinbeentjes/[email protected]
- name: Build library
run: yarn build
- name: Publish library
run: yarn publish --new-version ${{ steps.package-version.outputs.current-version }} --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Read changelog entry for version
id: read-changelog
uses: mindsers/[email protected]
with:
version: "${{ steps.package-version.outputs.current-version }}"
path: ./CHANGELOG.md
- name: Create release
uses: softprops/[email protected]
with:
prerelease: false
body: ${{ steps.read-changelog.outputs.changes }}