From 158978d19648cebaab5d9dd2199a3af949969687 Mon Sep 17 00:00:00 2001 From: Ibrahim Maga Date: Wed, 31 Mar 2021 17:07:53 -0700 Subject: [PATCH] chore: adding cd publish.yml for manual trigger with ADO (#4525) * chore: add cd-publish.yml for ADO manual trigger * add manual trigger: workflow_dispatch * update .npmrc file --- .github/workflows/cd-publish.yml | 40 ++++++++++++++++++++++++++++++++ .npmrc | 1 + 2 files changed, 41 insertions(+) create mode 100644 .github/workflows/cd-publish.yml diff --git a/.github/workflows/cd-publish.yml b/.github/workflows/cd-publish.yml new file mode 100644 index 00000000000..573d37c535b --- /dev/null +++ b/.github/workflows/cd-publish.yml @@ -0,0 +1,40 @@ +name: CI - FAST Manual Publish + +on: + workflow_dispatch: + +jobs: + build_linux: + runs-on: ubuntu-latest + + env: + NPM_PAT: ${{ secrets.NPM_PAT}} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_SERVICE_PAT: ${{ secrets.GH_PAT }} + GITHUB_SERVICE_USER: "Microsoft FAST Builds" + GITHUB_SERVICE_EMAIL: "fastdna@service.microsoft.com" + + steps: + - uses: actions/checkout@v2 + + - name: Add or Update packages + run: sudo yarn global add lerna + + - name: Authenticate Git for Pushes + run: | + git config --global user.name "${{ env.GITHUB_SERVICE_USER }}" + git config --global user.email "${{ env.GITHUB_SERVICE_EMAIL }}" + + - name: Install package dependencies / prepare workspaces + run: yarn install --frozen-lockfile + + - name: Testing Prettier format + run: lerna run prettier:diff + + - name: Testing unit tests + run: lerna run test --stream + + - name: Publish NPM changed packages + run: | + yarn publish-ci -y -n $NPM_PAT + \ No newline at end of file diff --git a/.npmrc b/.npmrc index b15cbc2c029..2f908d42d3e 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,3 @@ +registry=https://registry.npmjs.org/ package-lock=false