Added publish steps
This commit is contained in:
		
							
								
								
									
										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}}
 | 
			
		||||
		Reference in New Issue
	
	Block a user