|  | @@ -21,6 +21,10 @@ jobs:
 | 
	
		
			
				|  |  |          with:
 | 
	
		
			
				|  |  |            node-version: 12.14.1
 | 
	
		
			
				|  |  |            
 | 
	
		
			
				|  |  | +      - name: Check PR or cron
 | 
	
		
			
				|  |  | +        run: |
 | 
	
		
			
				|  |  | +          . check_cron_or_pr.sh
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |        - name: Clone VSCode repo
 | 
	
		
			
				|  |  |          run: |
 | 
	
		
			
				|  |  |            . get_repo.sh
 | 
	
	
		
			
				|  | @@ -30,7 +34,26 @@ jobs:
 | 
	
		
			
				|  |  |            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 | 
	
		
			
				|  |  |          run: |
 | 
	
		
			
				|  |  |            . check_tags.sh
 | 
	
		
			
				|  |  | -          
 | 
	
		
			
				|  |  | +        if: env.SHOULD_DEPLOY == 'yes'
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      - name: Compute cache key
 | 
	
		
			
				|  |  | +        id: yarnCacheKey
 | 
	
		
			
				|  |  | +        run: echo "::set-output name=value::$(node build/azure-pipelines/computeYarnCacheKey.js)"
 | 
	
		
			
				|  |  | +        if: env.SHOULD_BUILD == 'yes'
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      - name: Get yarn cache directory path
 | 
	
		
			
				|  |  | +        id: yarnCacheDirPath
 | 
	
		
			
				|  |  | +        run: echo "::set-output name=dir::$(yarn cache dir)"
 | 
	
		
			
				|  |  | +        if: env.SHOULD_BUILD == 'yes'
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      - name: Cache yarn directory
 | 
	
		
			
				|  |  | +        uses: actions/cache@v2
 | 
	
		
			
				|  |  | +        with:
 | 
	
		
			
				|  |  | +          path: ${{ steps.yarnCacheDirPath.outputs.dir }}
 | 
	
		
			
				|  |  | +          key: ${{ env.OS_NAME }}-${{ env.VSCODE_ARCH }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }}
 | 
	
		
			
				|  |  | +          restore-keys: ${{ env.OS_NAME }}-${{ env.VSCODE_ARCH }}-yarnCacheDir-
 | 
	
		
			
				|  |  | +        if: env.SHOULD_BUILD == 'yes'
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |        - name: Build
 | 
	
		
			
				|  |  |          env:
 | 
	
		
			
				|  |  |            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 | 
	
	
		
			
				|  | @@ -42,7 +65,7 @@ jobs:
 | 
	
		
			
				|  |  |            CERTIFICATE_OSX_P12: ${{ secrets.CERTIFICATE_OSX_P12 }}
 | 
	
		
			
				|  |  |            CERTIFICATE_OSX_PASSWORD: ${{ secrets.CERTIFICATE_OSX_PASSWORD }}
 | 
	
		
			
				|  |  |            CERTIFICATE_OSX_ID: ${{ secrets.CERTIFICATE_OSX_ID }}
 | 
	
		
			
				|  |  | -        if: env.SHOULD_BUILD == 'yes'
 | 
	
		
			
				|  |  | +        if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
 | 
	
		
			
				|  |  |          run: |
 | 
	
		
			
				|  |  |            if [ -d "VSCode-darwin-${VSCODE_ARCH}" ]; then # just in case the build failed
 | 
	
		
			
				|  |  |              cd "VSCode-darwin-${VSCODE_ARCH}"
 | 
	
	
		
			
				|  | @@ -61,7 +84,7 @@ jobs:
 | 
	
		
			
				|  |  |          run: |
 | 
	
		
			
				|  |  |            cd "VSCode-darwin-${VSCODE_ARCH}"
 | 
	
		
			
				|  |  |            zip -r -X -y ../VSCodium-darwin-${VSCODE_ARCH}-${LATEST_MS_TAG}.zip ./*.app
 | 
	
		
			
				|  |  | -        if: env.SHOULD_BUILD == 'yes'
 | 
	
		
			
				|  |  | +        if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |        - name: DMG the release
 | 
	
		
			
				|  |  |          run: |
 | 
	
	
		
			
				|  | @@ -69,15 +92,15 @@ jobs:
 | 
	
		
			
				|  |  |            npx create-dmg VSCodium.app ..
 | 
	
		
			
				|  |  |            mv "../VSCodium ${LATEST_MS_TAG}.dmg" "../VSCodium.${VSCODE_ARCH}.${LATEST_MS_TAG}.dmg"
 | 
	
		
			
				|  |  |            popd
 | 
	
		
			
				|  |  | -        if: env.SHOULD_BUILD == 'yes'
 | 
	
		
			
				|  |  | +        if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |        - name: Generate shasums
 | 
	
		
			
				|  |  |          run: ./sum.sh
 | 
	
		
			
				|  |  | -        if: env.SHOULD_BUILD == 'yes'
 | 
	
		
			
				|  |  | +        if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
 | 
	
		
			
				|  |  |        
 | 
	
		
			
				|  |  |        - name: Release
 | 
	
		
			
				|  |  |          uses: softprops/action-gh-release@v1
 | 
	
		
			
				|  |  | -        if: env.SHOULD_BUILD == 'yes'
 | 
	
		
			
				|  |  | +        if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
 | 
	
		
			
				|  |  |          with:
 | 
	
		
			
				|  |  |            tag_name: ${{ env.LATEST_MS_TAG }}
 | 
	
		
			
				|  |  |            files: |
 | 
	
	
		
			
				|  | @@ -88,7 +111,7 @@ jobs:
 | 
	
		
			
				|  |  |            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |        - name: Update versions repo
 | 
	
		
			
				|  |  | -        if: env.SHOULD_BUILD == 'yes'
 | 
	
		
			
				|  |  | +        if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
 | 
	
		
			
				|  |  |          run: ./update_version.sh
 | 
	
		
			
				|  |  |          env:
 | 
	
		
			
				|  |  |            GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
 |