From 7556d03863e62bd726e45a8db40e0deaa73f6919 Mon Sep 17 00:00:00 2001 From: Ira Hopkinson Date: Mon, 9 Oct 2023 09:47:39 +1300 Subject: [PATCH] Stop doing cross builds on release - follow-up to PR #535 --- .github/workflows/publish.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f82f720b80..07849f9ad4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,7 +19,7 @@ jobs: strategy: matrix: - os: [macos-latest, ubuntu-latest] + os: [windows-latest, macos-latest, ubuntu-latest] dotnet_version: [7.0.x] node_version: [18.x] @@ -43,11 +43,15 @@ jobs: npm install npm run build - - name: dotnet build - Windows on macOS - if: ${{ matrix.os == 'macos-latest' }} - run: npm run build:data-release:windows + - name: Publish releases - Windows + # If the branch is labeled as a release version (e.g. "release/v1.2.3"), + if: ${{ matrix.os == 'windows-latest' && startsWith(github.ref, 'refs/heads/release/v') && contains(github.ref, '.') }} + env: + # This is used for uploading release assets to github + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: npm exec electron-builder -- --publish always --win - - name: Publish releases - Windows and macOS + - name: Publish releases - macOS # If the branch is labeled as a release version (e.g. "release/v1.2.3"), if: ${{ matrix.os == 'macos-latest' && startsWith(github.ref, 'refs/heads/release/v') && contains(github.ref, '.') }} env: @@ -58,8 +62,7 @@ jobs: # CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} # This is used for uploading release assets to github GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - npm exec electron-builder -- --publish always --win --mac + run: npm exec electron-builder -- --publish always --mac - name: Publish releases - Linux # If the branch is labeled as a release version (e.g. "release/v1.2.3"), @@ -69,8 +72,7 @@ jobs: USE_HARD_LINKS: false # This is used for uploading release assets to github GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - npm exec electron-builder -- --publish always --linux + run: npm exec electron-builder -- --publish always --linux # Enable tmate debugging of manually-triggered workflows if the input option was provided - name: Setup tmate session