forked from edcarroll/ng2-semantic-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 939 Bytes
/
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
name: Release CI
on:
push:
tags: "*"
env:
NODE_VERSION: "18.x"
jobs:
build:
name: Build and Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: "https://registry.npmjs.org"
- name: Build package
run: |
npm install
npm run build:prod
- name: Publish package
run: |
cd dist/lib
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create release
run: |
VERSION=${GITHUB_REF/refs\/tags\//}
gh release create "${VERSION}" -t "${VERSION}" --generate-notes
gh release view "${VERSION}"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}