forked from bleenco/ngx-uploader
-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (34 loc) · 908 Bytes
/
release.yml
File metadata and controls
40 lines (34 loc) · 908 Bytes
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
name: Release CI
on:
push:
tags: "v*"
env:
NODE_VERSION: "18.x"
jobs:
build:
name: Build and Release
runs-on: ubuntu-latest
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:lib
- name: Publish package
run: |
cd dist/ngx-uploader
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}}