1616 required : false
1717 default : " "
1818 schedule :
19- - cron : " */2 * * * *"
19+ - cron : " */3 * * * *"
2020
2121jobs :
2222 cd :
2323 runs-on : ubuntu-latest
2424
2525 steps :
26- - name : output something
27- run : |
28- echo ${{ github.ref }}
29- echo ${{ github.event_name }}
30- echo ${{ github.event.inputs.version }}
31- echo ${{ github.event.inputs.preid }}
32-
33- - name : validate branch
34- if : ${{ (github.ref != 'refs/heads/dev' && github.ref != 'refs/heads/main') || (github.ref == 'refs/heads/dev' && (!startsWith(github.event.inputs.version, 'pre') || github.event.inputs.preid != 'alpha')) || (github.ref == 'refs/heads/main' && startsWith(github.event.inputs.version, 'pre') && github.event.inputs.preid != 'rc') }}
26+ - name : Validate inputs
27+ if : ${{ github.event_name == 'workflow_dispatch' && ((github.ref != 'refs/heads/dev' && github.ref != 'refs/heads/main') || (github.ref == 'refs/heads/dev' && (!startsWith(github.event.inputs.version, 'pre') || github.event.inputs.preid != 'alpha')) || (github.ref == 'refs/heads/main' && startsWith(github.event.inputs.version, 'pre') && github.event.inputs.preid != 'rc')) }}
3528 run : |
3629 exit 1
3730
38- - name : Checkout dev branch
39- if : ${{ github.event_name == 'schedule' }}
40- uses : actions/checkout@v2
41- with :
42- fetch-depth : 0
43- token : ${{ secrets.CD_PAT }}
44- ref : dev
45-
46- - name : Checkout release branch
47- if : ${{ github.event_name != 'schedule' }}
31+ - name : Checkout branch
4832 uses : actions/checkout@v2
4933 with :
5034 fetch-depth : 0
6751 - name : Setup git
6852 run : |
6953 git config --global user.name 'LongOddCode'
70- git config --global user.email 'long @microsoft.com'
54+ git config --global user.email 'haolong @microsoft.com'
7155
7256 - name : check whether vscode extension changed or not
7357 id : extension-checker
@@ -79,13 +63,18 @@ jobs:
7963 echo "::set-output name=CHANGED::false"
8064 fi
8165
66+ - name : daily release npm packages to npmjs.org
67+ if : ${{ github.event_name == 'schedule' }}
68+ run : |
69+ npx lerna publish --no-private --preid=alpha --dist-tag=alpha prerelease --yes
70+
8271 - name : release prerelease npm packages to npmjs.org
83- if : ${{ startsWith(github.event.inputs.version, 'pre') }}
72+ if : ${{ github.event_name == 'workflow_dispatch' && startsWith(github.event.inputs.version, 'pre') }}
8473 run : |
85- npx lerna publish --no-private --preid=${{github.event.inputs.preid }} --dist-tag=${{github.event.inputs.preid }} ${{ github.event.inputs.version }} --yes ${{ github.event.inputs.force }}
74+ npx lerna publish --no-private --preid=${{ github.event.inputs.preid }} --dist-tag=${{ github.event.inputs.preid }} ${{ github.event.inputs.version }} --yes ${{ github.event.inputs.force }}
8675
8776 - name : release stable npm packages to npmjs.org
88- if : ${{ github.ref == 'refs/heads/main' && !startsWith(github.event.inputs.version, 'pre') }}
77+ if : ${{ github.event_name == 'workflow_dispatch' && github. ref == 'refs/heads/main' && !startsWith(github.event.inputs.version, 'pre') }}
8978 run : |
9079 npx lerna publish --no-private --dist-tag=latest ${{ github.event.inputs.version }} --yes ${{ github.event.inputs.force }}
9180
0 commit comments