Release and Publish Library #2
This file contains hidden or 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
| # This workflow orchestrates the entire release process for an Angular library | |
| # by calling a series of modular, reusable workflows. | |
| name: Release and Publish Library | |
| on: | |
| push: | |
| workflow_dispatch: | |
| inputs: | |
| library_name: | |
| description: 'The project name of the library to release' | |
| required: true | |
| type: choice | |
| options: | |
| - ngx-fetcher-with-etag | |
| - ngx-json-schema-forms | |
| default: 'ngx-fetcher-with-etag' | |
| jobs: | |
| verify: | |
| name: 1. Verify Package | |
| uses: ./.github/workflows/angular-verify-package.yml | |
| with: | |
| library_path: 'projects/${{ inputs.library_name }}' | |
| library_name: ${{ inputs.library_name }} | |
| org_scope: '@profusion' | |
| secrets: inherit | |
| build: | |
| name: 2. Build Library | |
| needs: verify | |
| uses: ./.github/workflows/angular-build-library.yml | |
| with: | |
| lib_name: ${{ needs.verify.outputs.lib_name }} | |
| secrets: inherit | |
| tag: | |
| name: 3. Create Git Tag | |
| needs: [verify, build] | |
| uses: ./.github/workflows/git-tag.yml | |
| with: | |
| version: ${{ needs.verify.outputs.version }} | |
| tag_prefix: ${{ github.event.inputs.library_name }} | |
| secrets: inherit | |
| release: | |
| name: 4. Create GitHub Release | |
| needs: [verify, tag] | |
| uses: ./.github/workflows/github-release.yml | |
| with: | |
| tag: ${{ github.event.inputs.library_name }}-v${{ needs.verify.outputs.version }} | |
| secrets: inherit | |
| publish: | |
| name: 5. Publish to npm | |
| needs: [release] | |
| uses: ./.github/workflows/npm-publish.yml | |
| secrets: inherit | |