Skip to content

Production Build - [ hotfix/v4.44 ] - patch #469

Production Build - [ hotfix/v4.44 ] - patch

Production Build - [ hotfix/v4.44 ] - patch #469

name: Production Build
run-name: Production Build - [ ${{ github.ref_name || 'branch' }} ] - ${{ github.event.inputs.release_type || 'no_type_specified' }}
on:
workflow_dispatch:
inputs:
release_type:
description: 'Release type'
required: true
default: 'minor'
type: choice
options:
- major
- minor
- patch
repository_dispatch:
types: [release]
schedule:
- cron: '0 17 * * 4'
env:
AI_KEY: 3cf0d6ae-3327-414a-b7c1-12f31ef45eff
NX_AI_CON_STR: InstrumentationKey=3cf0d6ae-3327-414a-b7c1-12f31ef45eff;IngestionEndpoint=https://eastus-8.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/
BUMP_COMMAND: pnpm run bump --release-as ${{ github.event.inputs.release_type || 'minor' }}
jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
with:
token: ${{ secrets.AUTOMATION_PAT }}
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 20
- uses: pnpm/action-setup@v3
with:
version: 9.1.3
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- name: 'Version Bump'
run: git config --global user.email $GITHUB_ACTOR && git config --global user.name release-automation-${GITHUB_ACTOR}@microsoft.com && ${{ env.BUMP_COMMAND }} && pnpm install
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.AUTOMATION_PAT }}
branch: ${{ github.ref }}
build:
runs-on: ubuntu-latest
needs: bump-version
steps:
# checkout the repo
- name: 'Checkout Github Action'
uses: actions/checkout@master
with:
fetch-depth: 0
- name: Set up Node.js version 20
uses: actions/setup-node@v1
with:
node-version: 20
- uses: pnpm/action-setup@v3
with:
version: 9.1.3
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- name: 'Local Version Bump'
run: ${{ env.BUMP_COMMAND }} --skip.commit --skip.tag
- name: 'Set Designer Extension VSIX aiKey in package.json'
run: echo "`jq '.aiKey="${{ env.AI_KEY }}"' apps/vs-code-designer/src/package.json`" > apps/vs-code-designer/src/package.json
- name: 'Pack VSCode Designer Extension'
run: pnpm run vscode:designer:pack
- name: 'Get Previous tag'
id: previoustag
uses: 'WyriHaximus/github-action-get-previous-tag@v1'
with:
fallback: 0.0.0
- name: Archive VSIX
uses: actions/upload-artifact@v3
with:
path: |
apps/vs-code-designer/dist/*.vsix
- uses: ncipollo/release-action@v1
with:
artifacts: 'LICENSE.md,apps/vs-code-designer/dist/*.vsix'
generateReleaseNotes: true
tag: '${{ steps.previoustag.outputs.tag }}'
token: ${{ secrets.AUTOMATION_PAT }}
publish:
needs: bump-version
runs-on: ubuntu-latest
environment: E2ETesting
permissions:
id-token: write
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@master
with:
token: ${{ secrets.AUTOMATION_PAT }}
- name: Azure login
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_TESTING_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TESTING_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_TESTING_SUBSCRIPTION_ID }}
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 20
- uses: pnpm/action-setup@v3
with:
version: 9.1.3
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- name: 'Local Version Bump'
run: ${{ env.BUMP_COMMAND }} --skip.commit --skip.tag
- run: pnpm install --frozen-lockfile --strict-peer-dependencies
- name: 'Generate NPMRC'
shell: bash
run: |
token=`az account get-access-token --resource 499b84ac-1321-427f-aa17-267ca6975798 | jq -r .accessToken`
export ADO_TOKEN=$token
node ./productionNpmRCCreator.js
- name: 'Publish to NPM'
run: pnpm run publish --no-git-checks --access public --tag latest