ng-datatable/.github/workflows/build.yaml

42 lines
1.1 KiB
YAML
Raw Normal View History

2023-12-13 22:56:23 -05:00
name: Build
run-name: Build
on:
push:
jobs:
build:
name: Build NPM Project
runs-on: ubuntu-latest
2023-12-13 23:13:41 -05:00
container: node:8
2023-12-13 22:56:23 -05:00
steps:
- name: Clone Repository
uses: ztimson/actions/clone@develop
- name: Install Dependencies
run: npm i
- name: Build Project
2023-12-14 22:06:45 -05:00
run: npm run build
2023-12-13 22:56:23 -05:00
2023-12-14 22:25:38 -05:00
- name: Upload to Registry
uses: ztimson/actions/npm/publish@develop
2023-12-13 22:56:23 -05:00
tag:
name: Tag Version
needs: build
2023-12-14 23:36:43 -05:00
if: ${{github.ref_name}} == develop
2023-12-13 22:56:23 -05:00
runs-on: ubuntu-latest
2023-12-13 23:13:41 -05:00
container: node:8
2023-12-13 22:56:23 -05:00
steps:
- name: Clone Repository
uses: ztimson/actions/clone@develop
- name: Get Version Number
run: echo "VERSION=$(cat package.json | grep version | grep -Eo ':.+' | grep -Eo '[[:alnum:]\.\/\-]+')" >> $GITHUB_ENV
- name: Tag Version
uses: ztimson/actions/tag@develop
with:
tag: ${{env.VERSION}}