Skip to content

Commit

Permalink
fix: plop
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilb committed Sep 24, 2024
1 parent 6af7f94 commit 2d29c45
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ concurrency:

env:
# we want to publish on "push to master" only. When we don't want to publish, we want to upload artefacts
SHOULD_PUBLISH: ${{ github.event_name == 'push' && github.ref == 'master' }}
SHOULD_BUILD_ONLY: ${{ github.event_name != 'push' || github.ref != 'master' }}
SHOULD_PUBLISH: ${{ github.event_name == 'push' && github.ref == 'master' }}

jobs:
build_linux:
Expand Down Expand Up @@ -62,20 +61,20 @@ jobs:

- name: Build but do not publish ${{ matrix.pkg_to_build }}
# we want this to run always, except on "push" to "master"
if: env.SHOULD_BUILD_ONLY
if: ${{ env.SHOULD_PUBLISH == 'false' }}
run: |
sed -i 's/"target": \["deb"\]/"target": "${{ matrix.pkg_to_build }}"/g' package.json && yarn build-release
- name: Upload artefacts ${{ matrix.pkg_to_build }}
# we want this to run always, except on "push" to "master"
if: env.SHOULD_BUILD_ONLY
if: ${{ env.SHOULD_PUBLISH == 'false' }}
uses: ./actions/upload_prod_artefacts
with:
upload_prefix: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.pkg_to_build }}-others

- name: Build & publish ${{ matrix.pkg_to_build }}
# we want this to run only when on "push" to "master"
if: env.SHOULD_PUBLISH
if: ${{ env.SHOULD_PUBLISH == 'true' }}
run: |
sed -i 's/\"target\": \\[\"deb\"\\]/\"target\": \"${{ matrix.pkg_to_build }}\"/g' package.json; yarn build-release-publish
Expand All @@ -100,19 +99,19 @@ jobs:

- name: Build but do not publish
# we want this to run always, except on "push" to "master"
if: env.SHOULD_BUILD_ONLY
if: ${{ env.SHOULD_PUBLISH == 'false' }}
run: yarn build-release

- name: Upload artefacts
# we want this to run always, except on "push" to "master"
if: env.SHOULD_BUILD_ONLY
if: ${{ env.SHOULD_PUBLISH == 'false' }}
uses: ./actions/upload_prod_artefacts
with:
upload_prefix: ${{ runner.os }}-${{ runner.arch }}

- name: Build & publish
# we want this to run only when on "push" to "master"
if: env.SHOULD_PUBLISH
if: ${{ env.SHOULD_PUBLISH == 'true' }}
run: yarn build-release-publish # No other args needed for windows publish

# We want a mac arm64 build, and according to this https://github.com/actions/runner-images#available-images macos-14 is always arm64
Expand Down Expand Up @@ -143,21 +142,21 @@ jobs:

- name: Build but do not publish
# we want this to run always, except on "push" to "master"
if: env.SHOULD_BUILD_ONLY
if: ${{ env.SHOULD_PUBLISH == 'false' }}
run: |
source ./build/setup-mac-certificate.sh
yarn build-release --config.mac.bundleVersion=${{ github.ref }}
- name: Upload artefacts
# we want this to run always, except on "push" to "master"
if: env.SHOULD_BUILD_ONLY
if: ${{ env.SHOULD_PUBLISH == 'false' }}
uses: ./actions/upload_prod_artefacts
with:
upload_prefix: ${{ runner.os }}-${{ runner.arch }}

- name: Build & publish
# we want this to run only when on "push" to "master"
if: env.SHOULD_PUBLISH
if: ${{ env.SHOULD_PUBLISH == 'true' }}
run: |
source ./build/setup-mac-certificate.sh
build-release-publish --config.mac.bundleVersion=${{ github.ref }}
yarn build-release-publish --config.mac.bundleVersion=${{ github.ref }}

0 comments on commit 2d29c45

Please sign in to comment.