doc(): update README.md #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} |