-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/LuanPonick/po-angular int…
…o lookup-modal
- Loading branch information
Showing
117 changed files
with
5,223 additions
and
763 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
name: PO-UI Publish Beta | ||
|
||
# URL para os pacotes po-ui no npm | ||
env: | ||
SCHEMATICS_NPM_PATH: po-ui/ng-schematics | ||
STORAGE_NPM_PATH: po-ui/ng-storage | ||
SYNC_NPM_PATH: po-ui/ng-sync | ||
COMPONENTS_NPM_PATH: po-ui/ng-components | ||
TEMPLATES_NPM_PATH: po-ui/ng-templates | ||
CODE_EDITOR_NPM_PATH: po-ui/ng-code-editor | ||
WORKING_DIR: /home/runner/work/po-angular/po-angular/po-angular | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Check out po-angular | ||
uses: actions/checkout@v4 | ||
with: | ||
path: po-angular | ||
|
||
- name: Check out style | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: po-ui/po-style | ||
path: po-style | ||
|
||
- name: Check out lint | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: po-ui/po-tslint | ||
path: po-tslint | ||
|
||
- name: Install and Build | ||
run: npm install && npm run build | ||
working-directory: ${{env.WORKING_DIR}} | ||
|
||
# Pega a última versão dos pacotes publicados no npm e armazena em variáveis | ||
- run: echo "SCHEMATICS_LAST_PUBLISHED_VERSION=$(npm view @${{ env.SCHEMATICS_NPM_PATH }} dist-tags.beta)" >> $GITHUB_ENV | ||
- run: echo "STORAGE_LAST_PUBLISHED_VERSION=$(npm view @${{ env.STORAGE_NPM_PATH }} dist-tags.beta)" >> $GITHUB_ENV | ||
- run: echo "SYNC_LAST_PUBLISHED_VERSION=$(npm view @${{ env.SYNC_NPM_PATH }} dist-tags.beta)" >> $GITHUB_ENV | ||
- run: echo "COMPONENTS_LAST_PUBLISHED_VERSION=$(npm view @${{ env.COMPONENTS_NPM_PATH }} dist-tags.beta)" >> $GITHUB_ENV | ||
- run: echo "TEMPLATES_LAST_PUBLISHED_VERSION=$(npm view @${{ env.TEMPLATES_NPM_PATH }} dist-tags.beta)" >> $GITHUB_ENV | ||
- run: echo "CODE_EDITOR_LAST_PUBLISHED_VERSION=$(npm view @${{ env.CODE_EDITOR_NPM_PATH }} dist-tags.beta)" >> $GITHUB_ENV | ||
|
||
# Pega a versão no package.json | ||
- name: Get package.json version. | ||
id: package-version | ||
uses: martinbeentjes/npm-get-version-action@main | ||
with: | ||
path: po-angular | ||
|
||
# PUBLISH NG-SCHEMATICS | ||
- name: ng-schematics - publish | ||
# Se a versão remota for igual à versão que será publicada então ele pula o publish deste pacote e tenta publicar os demais pacotes | ||
if: (!contains(env.PACKAGE_VERSION, env.SCHEMATICS_LAST_PUBLISHED_VERSION)) | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm publish ${{env.WORKING_DIR}}/dist/ng-schematics --tag beta --ignore-scripts | ||
env: | ||
PACKAGE_VERSION: ${{ steps.package-version.outputs.current-version }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
# PUBLISH NG-STORAGE | ||
- name: ng-storage - publish | ||
if: (!contains(env.PACKAGE_VERSION, env.STORAGE_LAST_PUBLISHED_VERSION)) | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm publish ${{env.WORKING_DIR}}/dist/ng-storage --tag beta --ignore-scripts | ||
env: | ||
PACKAGE_VERSION: ${{ steps.package-version.outputs.current-version }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
# PUBLISH NG-SYNC | ||
- name: ng-sync - publish | ||
if: (!contains(env.PACKAGE_VERSION, env.SYNC_LAST_PUBLISHED_VERSION)) | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm publish ${{env.WORKING_DIR}}/dist/ng-sync --tag beta --ignore-scripts | ||
env: | ||
PACKAGE_VERSION: ${{ steps.package-version.outputs.current-version }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
# PUBLISH NG-COMPONENTS | ||
- name: ng-components - publish | ||
if: (!contains(env.PACKAGE_VERSION, env.COMPONENTS_LAST_PUBLISHED_VERSION)) | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm publish ${{env.WORKING_DIR}}/dist/ng-components --tag beta --ignore-scripts | ||
env: | ||
PACKAGE_VERSION: ${{ steps.package-version.outputs.current-version }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
# PUBLISH NG-TEMPLATES | ||
- name: ng-templates - publish | ||
if: (!contains(env.PACKAGE_VERSION, env.TEMPLATES_LAST_PUBLISHED_VERSION)) | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm publish ${{env.WORKING_DIR}}/dist/ng-templates --tag beta --ignore-scripts | ||
env: | ||
PACKAGE_VERSION: ${{ steps.package-version.outputs.current-version }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
# PUBLISH NG-CODE-EDITOR | ||
- name: ng-code-editor - publish | ||
if: (!contains(env.PACKAGE_VERSION, env.CODE_EDITOR_LAST_PUBLISHED_VERSION)) | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm publish ${{env.WORKING_DIR}}/dist/ng-code-editor --tag beta --ignore-scripts | ||
env: | ||
PACKAGE_VERSION: ${{ steps.package-version.outputs.current-version }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
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
Oops, something went wrong.