name: Publish (Windows) # Only allow manual run on: workflow_dispatch jobs: publish: runs-on: ${{ matrix.os }} strategy: matrix: os: [windows-2019] steps: - name: Checkout git repo uses: actions/checkout@v1 - name: Install Node, NPM uses: actions/setup-node@v1 with: node-version: '14.16.1' - name: Setup yarn run: npm install -g yarn - name: Set msvs_version run: npm config set msvs_version "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise" - name: Test run: echo "$(npm config get msvs_version)" - name: Get yarn cache directory path id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - uses: actions/cache@v1 id: yarn-cache with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - name: Install `src/` dependencies uses: nick-invision/retry@v2.4.0 with: timeout_minutes: 30 max_attempts: 3 retry_on: error command: | cd src && yarn --frozen-lockfile --ignore-scripts --network-concurrency 1 --network-timeout 300000 on_retry_command: npm cache clean --force && yarn cache clean --all shell: cmd - name: Install dependencies uses: nick-invision/retry@v2.4.0 with: timeout_minutes: 30 max_attempts: 3 retry_on: error command: | yarn install --frozen-lockfile --ignore-scripts --prefer-offline --network-concurrency 1 --network-timeout 300000 on_retry_command: npm cache clean --force && yarn cache clean --all shell: cmd - name: Install dependencies with scripts uses: nick-invision/retry@v2.4.0 with: timeout_minutes: 30 max_attempts: 3 retry_on: error command: | yarn install --frozen-lockfile --prefer-offline --network-concurrency 1 --network-timeout 300000 on_retry_command: npm cache clean --force && yarn cache clean --all shell: cmd - name: Publish releases env: GITHUB_TOKEN: ${{ secrets.PAT }} uses: nick-invision/retry@v2.4.0 with: timeout_minutes: 30 max_attempts: 3 retry_on: error command: | yarn postinstall && yarn build && yarn electron-builder --publish always --win on_retry_command: npm cache clean --force && yarn cache clean --all shell: cmd