|
1 |
| -name: New Release Branch |
2 |
| - |
3 |
| -on: |
4 |
| - repository_dispatch: |
5 |
| - types: [new-release-branch] |
6 |
| - |
7 |
| -permissions: |
8 |
| - contents: read |
9 |
| - |
10 |
| -# Ensure scripts are run with pipefail. See: |
11 |
| -# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference |
12 |
| -defaults: |
13 |
| - run: |
14 |
| - shell: bash |
15 |
| - |
16 |
| -jobs: |
17 |
| - build: |
18 |
| - runs-on: ubuntu-latest |
19 |
| - |
20 |
| - steps: |
21 |
| - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 |
22 |
| - with: |
23 |
| - filter: blob:none # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/ |
24 |
| - fetch-depth: 0 # Default is 1; need to set to 0 to get the benefits of blob:none. |
25 |
| - token: ${{ secrets.TS_BOT_GITHUB_TOKEN }} |
26 |
| - - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 |
27 |
| - - run: | |
28 |
| - npm --version |
29 |
| - # corepack enable npm |
30 |
| - npm install -g $(jq -r '.packageManager' < package.json) |
31 |
| - npm --version |
32 |
| - - run: | |
33 |
| - git checkout -b ${{ github.event.client_payload.branch_name }} |
34 |
| - sed -i -e 's/"version": ".*"/"version": "${{ github.event.client_payload.package_version }}"/g' package.json |
35 |
| - sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' src/compiler/corePublic.ts |
36 |
| - sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/typescript.d.ts |
37 |
| - sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/tsserverlibrary.d.ts |
38 |
| - sed -i -e 's/const version\(: string\)\{0,1\} = `${versionMajorMinor}.0-.*`/const version = `${versionMajorMinor}.0-${{ github.event.client_payload.core_tag || 'dev' }}`/g' src/compiler/corePublic.ts |
39 |
| - npm ci |
40 |
| - npm install # update package-lock.json to ensure the version bump is included |
41 |
| - npx hereby LKG |
42 |
| - npm test |
43 |
| - git diff |
44 |
| - git add package.json package-lock.json |
45 |
| - git add src/compiler/corePublic.ts |
46 |
| - git add tests/baselines/reference/api/typescript.d.ts |
47 |
| - git add tests/baselines/reference/api/tsserverlibrary.d.ts |
48 |
| - git add --force ./lib |
49 |
| - git config user.email "[email protected]" |
50 |
| - git config user.name "TypeScript Bot" |
51 |
| - git commit -m 'Bump version to ${{ github.event.client_payload.package_version }} and LKG' |
52 |
| - git push --set-upstream origin ${{ github.event.client_payload.branch_name }} |
| 1 | +name: New Release Branch |
| 2 | + |
| 3 | +on: |
| 4 | + repository_dispatch: |
| 5 | + types: [new-release-branch] |
| 6 | + |
| 7 | +permissions: |
| 8 | + contents: read |
| 9 | + |
| 10 | +# Ensure scripts are run with pipefail. See: |
| 11 | +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference |
| 12 | +defaults: |
| 13 | + run: |
| 14 | + shell: bash |
| 15 | + |
| 16 | +jobs: |
| 17 | + build: |
| 18 | + runs-on: ubuntu-latest |
| 19 | + |
| 20 | + steps: |
| 21 | + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 |
| 22 | + with: |
| 23 | + filter: blob:none # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/ |
| 24 | + fetch-depth: 0 # Default is 1; need to set to 0 to get the benefits of blob:none. |
| 25 | + token: ${{ secrets.TS_BOT_GITHUB_TOKEN }} |
| 26 | + - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 |
| 27 | + - run: | |
| 28 | + npm --version |
| 29 | + # corepack enable npm |
| 30 | + npm install -g $(jq -r '.packageManager' < package.json) |
| 31 | + npm --version |
| 32 | + - run: | |
| 33 | + git checkout -b ${{ github.event.client_payload.branch_name }} |
| 34 | + sed -i -e 's/"version": ".*"/"version": "${{ github.event.client_payload.package_version }}"/g' package.json |
| 35 | + sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' src/compiler/corePublic.ts |
| 36 | + sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/typescript.d.ts |
| 37 | + sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/tsserverlibrary.d.ts |
| 38 | + sed -i -e 's/const version\(: string\)\{0,1\} = `${versionMajorMinor}.0-.*`/const version = `${versionMajorMinor}.0-${{ github.event.client_payload.core_tag || 'dev' }}`/g' src/compiler/corePublic.ts |
| 39 | + npm ci |
| 40 | + npm install # update package-lock.json to ensure the version bump is included |
| 41 | + npx hereby LKG |
| 42 | + npm test |
| 43 | + git diff |
| 44 | + git add package.json package-lock.json |
| 45 | + git add src/compiler/corePublic.ts |
| 46 | + git add tests/baselines/reference/api/typescript.d.ts |
| 47 | + git add tests/baselines/reference/api/tsserverlibrary.d.ts |
| 48 | + git add --force ./lib |
| 49 | + git config user.email "[email protected]" |
| 50 | + git config user.name "TypeScript Bot" |
| 51 | + git commit -m 'Bump version to ${{ github.event.client_payload.package_version }} and LKG' |
| 52 | + git push --set-upstream origin ${{ github.event.client_payload.branch_name }} |
0 commit comments