Added publish steps
This commit is contained in:
parent
43b11ab295
commit
8a58160c2e
40
.github/workflows/build.yaml
vendored
40
.github/workflows/build.yaml
vendored
@ -23,10 +23,48 @@ jobs:
|
||||
- name: Test
|
||||
run: npm run test:coverage
|
||||
|
||||
- name: Cache Artifacts
|
||||
uses: ztimson/actions/cache@develop
|
||||
with:
|
||||
pattern: dist
|
||||
|
||||
- name: Upload Docs
|
||||
if: ${{inputs.artifacts}} != "false"
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: docs
|
||||
path: docs
|
||||
retention-days: 7
|
||||
|
||||
tag:
|
||||
name: Tag Version
|
||||
needs: build
|
||||
if: ${{github.ref_name}} == 'release'
|
||||
runs-on: ubuntu-latest
|
||||
container: node
|
||||
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}}
|
||||
|
||||
publish:
|
||||
name: Tag Version
|
||||
needs: build
|
||||
if: ${{github.ref_name}} == 'release'
|
||||
runs-on: ubuntu-latest
|
||||
container: node
|
||||
steps:
|
||||
- name: Clone Repository
|
||||
uses: ztimson/actions/clone@develop
|
||||
|
||||
- name: Restore Artifacts
|
||||
uses: ztimson/actions/cache/restore@develop
|
||||
|
||||
- name: Upload to Registry
|
||||
uses: ztimson/actions/npm/publish@develop
|
||||
|
27
.github/workflows/publish.yaml
vendored
27
.github/workflows/publish.yaml
vendored
@ -1,27 +0,0 @@
|
||||
name: Publish
|
||||
run-name: Publish
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows:
|
||||
- Build
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
tag:
|
||||
name: Tag Version
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
container: node
|
||||
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}}
|
@ -9,7 +9,7 @@
|
||||
"types": "dist/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "tsc && npm run build:docs",
|
||||
"build:docs": "npx typedoc --readme none --out docs src/index.ts",
|
||||
"build:docs": "npx typedoc --readme none --plugin typedoc-plugin-markdown --out docs src/index.ts",
|
||||
"test": "npx jest --verbose",
|
||||
"test:coverage": "npx jest --verbose --coverage",
|
||||
"watch": "npm run build && npx tsc --watch"
|
||||
|
Loading…
Reference in New Issue
Block a user