diff --git a/.github/scripts/prerelease-feature-control.sh b/.github/scripts/prerelease-feature-control.sh index 2b5d3f73f4..22d335553f 100644 --- a/.github/scripts/prerelease-feature-control.sh +++ b/.github/scripts/prerelease-feature-control.sh @@ -1,5 +1,5 @@ #!/bin/bash filePath=packages/vscode-extension/src/releaseBasedFeatureSettings.ts -echo "Update feature settings in $filePath if alpha or beta release" +echo "Update feature settings in $filePath if alpha or preview release" sed -i -e "s@const shouldEnableTeamsCopilotChatUI = false@const shouldEnableTeamsCopilotChatUI = true@g" $filePath echo "Prerelease feature setting update done." diff --git a/.github/scripts/vsc-version.sh b/.github/scripts/vsc-version.sh index 77c04196fc..b6d723d16f 100644 --- a/.github/scripts/vsc-version.sh +++ b/.github/scripts/vsc-version.sh @@ -9,12 +9,12 @@ echo '-----------------' $VERSION MINOR_VER=$(echo $VERSION | awk -F. '{print $2}') DATE_WITH_TIME=`date "+%Y%m%d%H"` # prerelease version should set minor version to odd number, and set patch version as timestamp. -if [ "$PREID" == "beta" ]; then +if [ "$PREID" == "preview" ]; then if [ $((MINOR_VER%2)) -eq 0 ]; then - echo "Need to bump up version with even minor version for beta" + echo "Need to bump up version with even minor version for preview" VERSION=$(echo ${VERSION%-*} | awk -v val=$DATE_WITH_TIME -F. '/[0-9]+\./{$2++;$3=val;print}' OFS=.) else - echo "Need to set patch version as timestamp for beta" + echo "Need to set patch version as timestamp for preview" VERSION=$(echo ${VERSION%-*} | awk -v val=$DATE_WITH_TIME -F. '/[0-9]+\./{$3=val;print}' OFS=.) fi echo '=====================' $VERSION diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 6fed783581..4c69b35db6 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -4,17 +4,13 @@ on: workflow_dispatch: inputs: preid: - description: "preid name(alpha, beta, rc, stable)" + description: "preid name(alpha, preview, rc, stable)" required: true - default: "rc" + default: "preview" series: description: "release sprint series name" required: false default: "" - skip-version-rc: - description: "release RC version just with lerna publish, skip run lerna version(yes or no)" - required: false - default: "no" pkgs: type: string required: false @@ -97,13 +93,13 @@ jobs: run: | npx lerna version prerelease --preid=alpha.$(git rev-parse --short HEAD) --exact --no-push --allow-branch dev --yes - - name: release beta packages to npmjs.org - if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.preid == 'beta' }} + - name: release preview packages to npmjs.org + if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.preid == 'preview' }} run: | npx lerna version prerelease --preid=beta.$(date "+%Y%m%d%H") --exact --no-push --allow-branch ${GITHUB_REF#refs/*/} --yes - name: version rc npm packages to npmjs.org - if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.preid == 'rc' && github.event.inputs.skip-version-rc == 'no'}} + if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.preid == 'rc' }} run: | npx lerna version prerelease --conventional-prerelease --preid=rc --no-changelog --allow-branch ${GITHUB_REF#refs/*/} --yes @@ -176,7 +172,7 @@ jobs: git commit -m "build: replace sideloading placeholders" - name: enable prerelease only features - if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && (github.event.inputs.preid == 'alpha' || github.event.inputs.preid == 'beta')) }} + if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && (github.event.inputs.preid == 'alpha' || github.event.inputs.preid == 'preview')) }} run: | bash .github/scripts/prerelease-feature-control.sh git add ./packages/vscode-extension/src/releaseBasedFeatureSettings.ts @@ -237,8 +233,8 @@ jobs: run: | npx lerna publish from-package --dist-tag=alpha --yes --allow-branch dev - - name: publish beta release to npm org - if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.preid == 'beta' }} + - name: publish preview release to npm org + if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.preid == 'preview' }} run: | npx lerna publish from-package --dist-tag=beta --yes @@ -277,7 +273,7 @@ jobs: sleep 20 npm run build cd ./packages/vscode-extension - if [ "$PREID" == "beta" ]; then + if [ "$PREID" == "preview" ]; then pnpm dlx vsce package --no-dependencies --pre-release else pnpm dlx vsce package --no-dependencies