TypeScript/.github/workflows/new-release-branch.yaml

39 lines
1.8 KiB
YAML
Raw Normal View History

2020-02-19 22:10:47 +01:00
name: New Release Branch
2020-02-19 22:15:07 +01:00
on:
repository_dispatch:
types: new-release-branch
2020-02-19 22:10:47 +01:00
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Use node version 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
2020-02-19 22:10:47 +01:00
- uses: actions/checkout@v2
with:
fetch-depth: 5
- run: |
git checkout -b ${{ github.event.client_payload.branch_name }}
sed -i -e 's/"version": ".*"/"version": "${{ github.event.client_payload.package_version }}"/g' package.json
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' src/compiler/corePublic.ts
2020-02-19 22:33:39 +01:00
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/typescript.d.ts
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/tsserverlibrary.d.ts
2020-02-19 22:10:47 +01:00
sed -i -e 's/const version = `${versionMajorMinor}.0-.*`/const version = `${versionMajorMinor}.0-${{ github.event.client_payload.core_tag || 'dev' }}`/g' src/compiler/corePublic.ts
npm install
gulp LKG
npm test
git diff
git add package.json
git add src/compiler/corePublic.ts
2020-02-19 22:33:39 +01:00
git add tests/baselines/reference/api/typescript.d.ts
git add tests/baselines/reference/api/tsserverlibrary.d.ts
2020-02-19 22:10:47 +01:00
git add ./lib
git config user.email "ts_bot@rcavanaugh.com"
git config user.name "TypeScript Bot"
git commit -m 'Bump version to ${{ github.event.client_payload.package_version }} and LKG'
git push --set-upstream origin ${{ github.event.client_payload.branch_name }}